[GH-ISSUE #74] Running in public directory on Fedora home server #54

Closed
opened 2026-02-26 02:31:56 +03:00 by kerem · 14 comments
Owner

Originally created by @ronilaukkarinen on GitHub (Dec 16, 2015).
Original GitHub issue: https://github.com/koel/koel/issues/74

Hello,

First of all, sounds interesting project! I'm keen on this after using Subsonic for a long time, which is "commercial" and quite deprecated, not to mention pain to develop as a front end dev.

There's no mention in the wiki about running this in public domain. Installed just fine with npm, bower and composer, set up vhost to point to subdomain properly, but always getting a timeout. Also getting this in

Only thing I got in logs was this:

[Wed Dec 16 14:48:49.291696 2015] [:error] [pid 14524] [client 192.168.2.100:47635] PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/koel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/html/koel/bootstrap/cache/compiled.php:13350\nStack trace:\n#0 /var/www/html/koel/bootstrap/cache/compiled.php(13288): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/html/koel/bootstrap/cache/compiled.php(13051): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n#2 /var/www/html/koel/bootstrap/cache/compiled.php(13147): Monolog\\Logger->addRecord(400, Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#3 /var/www/html/koel/bootstrap/cache/compiled.php(12864): Monolog\\Logger->error(Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#4 /var/www/html/koel/bootstrap/cache/compiled.php(12835): Illuminate\\Log\\Writer->writeLog('error', Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#5 /var/www/html/koel/vendor/laravel/framework/src/Illuminate/Foun in /var/www/html/koel/bootstrap/cache/compiled.php on line 13350

But apparently it's solved when added better permissions to storage and vendor.

After timeout I see my domain has been changed in addressbar to a local IP address, so no wonder it timeouts. Any tips how to get this to run from outside my local network? or is it intended to use as so?

Originally created by @ronilaukkarinen on GitHub (Dec 16, 2015). Original GitHub issue: https://github.com/koel/koel/issues/74 Hello, First of all, sounds interesting project! I'm keen on this after using Subsonic for a long time, which is "commercial" and quite deprecated, not to mention pain to develop as a front end dev. There's no mention in the wiki about running this in public domain. Installed just fine with npm, bower and composer, set up vhost to point to subdomain properly, but always getting a timeout. Also getting this in Only thing I got in logs was this: ``` [Wed Dec 16 14:48:49.291696 2015] [:error] [pid 14524] [client 192.168.2.100:47635] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/koel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied' in /var/www/html/koel/bootstrap/cache/compiled.php:13350\nStack trace:\n#0 /var/www/html/koel/bootstrap/cache/compiled.php(13288): Monolog\\Handler\\StreamHandler->write(Array)\n#1 /var/www/html/koel/bootstrap/cache/compiled.php(13051): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n#2 /var/www/html/koel/bootstrap/cache/compiled.php(13147): Monolog\\Logger->addRecord(400, Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#3 /var/www/html/koel/bootstrap/cache/compiled.php(12864): Monolog\\Logger->error(Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#4 /var/www/html/koel/bootstrap/cache/compiled.php(12835): Illuminate\\Log\\Writer->writeLog('error', Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n#5 /var/www/html/koel/vendor/laravel/framework/src/Illuminate/Foun in /var/www/html/koel/bootstrap/cache/compiled.php on line 13350 ``` But apparently it's solved when added better permissions to `storage` and `vendor`. After timeout I see my domain has been changed in addressbar to a local IP address, so no wonder it timeouts. Any tips how to get this to run from outside my local network? or is it intended to use as so?
kerem closed this issue 2026-02-26 02:31:56 +03:00
Author
Owner

@phanan commented on GitHub (Dec 16, 2015):

Koel should run file outside of a local network, and in fact I'm using it just that way. Your described errors don't seem to be related to Koel per-se, but about your web/domain/hosting configuration apparently.

<!-- gh-comment-id:165112541 --> @phanan commented on GitHub (Dec 16, 2015): Koel should run file outside of a local network, and in fact I'm using it just that way. Your described errors don't seem to be related to Koel per-se, but about your web/domain/hosting configuration apparently.
Author
Owner

@ronilaukkarinen commented on GitHub (Dec 16, 2015):

I have a home server, and my other subdomains are working properly. This is my virtualhosts entry in httpd.conf (myserver and myuser changed for security reasons for this paste):

<VirtualHost *:80>
    ServerName koel.myserver.us

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://192.168.2.100:80/koel/
    ProxyPassReverse / http://192.168.2.100:80/koel/

    <Location />
        AuthUserFile /var/www/.htpasswd_myfile
        AuthName authorization
        AuthType Basic
        require user myuser
    </Location>

</VirtualHost>

Any tips? do I need to run php artisan serve by default? Laravel is new to me.

<!-- gh-comment-id:165116981 --> @ronilaukkarinen commented on GitHub (Dec 16, 2015): I have a home server, and my other subdomains are working properly. This is my virtualhosts entry in `httpd.conf` (`myserver` and `myuser` changed for security reasons for this paste): ``` <VirtualHost *:80> ServerName koel.myserver.us <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://192.168.2.100:80/koel/ ProxyPassReverse / http://192.168.2.100:80/koel/ <Location /> AuthUserFile /var/www/.htpasswd_myfile AuthName authorization AuthType Basic require user myuser </Location> </VirtualHost> ``` Any tips? do I need to run `php artisan serve` by default? Laravel is new to me.
Author
Owner

@phanan commented on GitHub (Dec 16, 2015):

Unfortunately I don't have enough Apache config knowledge to support this, sorry.

<!-- gh-comment-id:165165083 --> @phanan commented on GitHub (Dec 16, 2015): Unfortunately I don't have enough Apache config knowledge to support this, sorry.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

this should solve it http://stackoverflow.com/questions/29912997/laravel-routes-behind-reverse-proxy

<!-- gh-comment-id:165302967 --> @etopian commented on GitHub (Dec 17, 2015): this should solve it http://stackoverflow.com/questions/29912997/laravel-routes-behind-reverse-proxy
Author
Owner

@NamPNQ commented on GitHub (Dec 17, 2015):

Oh no, don't use php serve and apache proxy pass, u can try with this config github.com/NamPNQ/koel@bad5c94e92/apache.conf

<!-- gh-comment-id:165501776 --> @NamPNQ commented on GitHub (Dec 17, 2015): Oh no, don't use php serve and apache proxy pass, u can try with this config https://github.com/NamPNQ/koel/blob/bad5c94e921fa42f7a2c9287b2a1849e772ccfb2/apache.conf
Author
Owner

@ronilaukkarinen commented on GitHub (Dec 17, 2015):

@NamPNQ I don't get how is that supposed to work with sub domains and with koel in its own subdirectory. I got it working by using command php artisan serve --hostname 192.168.2.100 and this in my httpd.conf:

<VirtualHost *:80>
    ServerName koel.myserver.us

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://192.168.2.100:8000/
    ProxyPassReverse / http://192.168.2.100:8000/

</VirtualHost>
<!-- gh-comment-id:165522973 --> @ronilaukkarinen commented on GitHub (Dec 17, 2015): @NamPNQ I don't get how is that supposed to work with sub domains and with koel in its own subdirectory. I got it working by using command `php artisan serve --hostname 192.168.2.100` and this in my httpd.conf: ``` <VirtualHost *:80> ServerName koel.myserver.us <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://192.168.2.100:8000/ ProxyPassReverse / http://192.168.2.100:8000/ </VirtualHost> ```
Author
Owner

@NamPNQ commented on GitHub (Dec 18, 2015):

@ronilaukkarinen:

<VirtualHost *:80>
        ServerName koel.myserver.us

        DocumentRoot /path/to/koel
        <Directory /path/to/koel>
                AllowOverride All
        </Directory>

</VirtualHost>
<!-- gh-comment-id:165654315 --> @NamPNQ commented on GitHub (Dec 18, 2015): @ronilaukkarinen: ``` <VirtualHost *:80> ServerName koel.myserver.us DocumentRoot /path/to/koel <Directory /path/to/koel> AllowOverride All </Directory> </VirtualHost> ```
Author
Owner

@ronilaukkarinen commented on GitHub (Dec 18, 2015):

@NamPNQ That works, thanks!

<!-- gh-comment-id:165717618 --> @ronilaukkarinen commented on GitHub (Dec 18, 2015): @NamPNQ That works, thanks!
Author
Owner

@vukidrock commented on GitHub (Dec 22, 2015):

@ronilaukkarinen @NamPNQ

it's not work, the result

Not Found

The requested URL /index.php was not found on this server.

the url on address bar show

http://www.my-web.com/koel/ <music note icon>
<!-- gh-comment-id:166629527 --> @vukidrock commented on GitHub (Dec 22, 2015): @ronilaukkarinen @NamPNQ it's not work, the result ``` Not Found The requested URL /index.php was not found on this server. ``` the url on address bar show ``` http://www.my-web.com/koel/ <music note icon> ```
Author
Owner

@phanan commented on GitHub (Dec 22, 2015):

Koel don't work from a subfolder.

<!-- gh-comment-id:166639062 --> @phanan commented on GitHub (Dec 22, 2015): Koel don't work from a subfolder.
Author
Owner

@ronilaukkarinen commented on GitHub (Dec 22, 2015):

@vukidrock I have koel in a "subfolder", but then koel must be set up in subdomain. I have apache on Fedora and it works just fine. I suggest you to try the vhost setup discussed in this thread. @NamPNQ's simple vhost is the best approach so far on apache.

<!-- gh-comment-id:166640626 --> @ronilaukkarinen commented on GitHub (Dec 22, 2015): @vukidrock I have koel in a "subfolder", but then koel must be set up in subdomain. I have apache on Fedora and it works just fine. I suggest you to try the vhost setup discussed in this thread. @NamPNQ's simple vhost is the best approach so far on apache.
Author
Owner

@vukidrock commented on GitHub (Dec 22, 2015):

@ronilaukkarinen @phanan It's OK, unbelievable, it's work if I set subdomain, thank you so much

<!-- gh-comment-id:166644973 --> @vukidrock commented on GitHub (Dec 22, 2015): @ronilaukkarinen @phanan It's OK, unbelievable, it's work if I set subdomain, thank you so much
Author
Owner

@X-Ryl669 commented on GitHub (Aug 9, 2016):

Koel don't work from a subfolder.

Why ? Is it absolutely required ?

<!-- gh-comment-id:238560399 --> @X-Ryl669 commented on GitHub (Aug 9, 2016): > Koel don't work from a subfolder. Why ? Is it absolutely required ?
Author
Owner

@phanan commented on GitHub (Aug 10, 2016):

Yes it is, by design.

On Tuesday, August 9, 2016, X-Ryl669 notifications@github.com wrote:

Koel don't work from a subfolder.
Why ? Is it absolutely required ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/74#issuecomment-238560399, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0kI2vuuJHMR3HrHdY3aJeRPEfQuoks5qeIbsgaJpZM4G2ewG
.

<!-- gh-comment-id:238735860 --> @phanan commented on GitHub (Aug 10, 2016): Yes it is, by design. On Tuesday, August 9, 2016, X-Ryl669 notifications@github.com wrote: > Koel don't work from a subfolder. > Why ? Is it absolutely required ? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > https://github.com/phanan/koel/issues/74#issuecomment-238560399, or mute > the thread > https://github.com/notifications/unsubscribe-auth/AHrt0kI2vuuJHMR3HrHdY3aJeRPEfQuoks5qeIbsgaJpZM4G2ewG > .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#54
No description provided.