[GH-ISSUE #529] Support for non-root folder installation #374

Closed
opened 2026-02-26 02:33:00 +03:00 by kerem · 8 comments
Owner

Originally created by @ElectronicWar on GitHub (Jan 31, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/529

Freshly installed Koel v3.5.4 on Debian Stretch, Node 6.9.4, yarn v0.19.1, PHP 7.0.14, MariaDB 10, Nginx 1.10.2

I've edited .env and set APP_URL=https://example.org/koel/

I haven't seen anything else that looks like a suitable option.
The Koel page loads, but most resources are missing and the api is using the wrong url as well.

This results in non-working login and a bleak login page.
Some example request:
https://example.com/public/img/logo.svg instead of https://example.com/koel/public/img/logo.svg
Api is called from https://example.org/api/me instead of https://example.org/koel/api/me

Is it even supported to be run in a subfolder?

Originally created by @ElectronicWar on GitHub (Jan 31, 2017). Original GitHub issue: https://github.com/koel/koel/issues/529 Freshly installed Koel v3.5.4 on Debian Stretch, Node 6.9.4, yarn v0.19.1, PHP 7.0.14, MariaDB 10, Nginx 1.10.2 I've edited `.env` and set `APP_URL=https://example.org/koel/` I haven't seen anything else that looks like a suitable option. The Koel page loads, but most resources are missing and the api is using the wrong url as well. This results in non-working login and a bleak login page. Some example request: `https://example.com/public/img/logo.svg` instead of `https://example.com/koel/public/img/logo.svg` Api is called from `https://example.org/api/me` instead of `https://example.org/koel/api/me` Is it even supported to be run in a subfolder?
kerem closed this issue 2026-02-26 02:33:00 +03:00
Author
Owner

@phanan commented on GitHub (Feb 1, 2017):

Sorry, but Koel doesn't support subfolder installation.

<!-- gh-comment-id:276637940 --> @phanan commented on GitHub (Feb 1, 2017): Sorry, but Koel doesn't support subfolder installation.
Author
Owner

@paulklemm commented on GitHub (Feb 1, 2017):

Are there plans for this on the projects road map? This would be very useful for me.

<!-- gh-comment-id:276644429 --> @paulklemm commented on GitHub (Feb 1, 2017): Are there plans for this on the projects road map? This would be very useful for me.
Author
Owner

@phanan commented on GitHub (Feb 1, 2017):

Re-opening so that I/contributors can revisit this later.

<!-- gh-comment-id:276651712 --> @phanan commented on GitHub (Feb 1, 2017): Re-opening so that I/contributors can revisit this later.
Author
Owner

@katlyn commented on GitHub (Feb 11, 2017):

This is probably a little hacky, but I have run Koel in a sub folder by putting the installation in that folder on a web server. I am not sure if this works for the current version, but after I did composer install and that stuff it worked in the sub folder.
For example, if you want it to be accessed at example.com/koel, install Koel in PUBLIC_DIR/koel.

<!-- gh-comment-id:279176681 --> @katlyn commented on GitHub (Feb 11, 2017): This is probably a little hacky, but I have run Koel in a sub folder by putting the installation in that folder on a web server. I am not sure if this works for the current version, but after I did `composer install` and that stuff it worked in the sub folder. For example, if you want it to be accessed at `example.com/koel`, install Koel in `PUBLIC_DIR/koel`.
Author
Owner

@ElectronicWar commented on GitHub (Feb 11, 2017):

For example, if you want it to be accessed at example.com/koel, install Koel in PUBLIC_DIR/koel.

Didn't work for me as mentioned above, the api would still make requests ignoring the subfolder.

<!-- gh-comment-id:279177489 --> @ElectronicWar commented on GitHub (Feb 11, 2017): > For example, if you want it to be accessed at example.com/koel, install Koel in PUBLIC_DIR/koel. Didn't work for me as mentioned above, the api would still make requests ignoring the subfolder.
Author
Owner

@katlyn commented on GitHub (Feb 11, 2017):

Just tried it with the current version, and it looks like @ElectronicWar is right. I don't know which version I was using at the time, or if if I changed any files, but thought it was worth a try.

<!-- gh-comment-id:279178812 --> @katlyn commented on GitHub (Feb 11, 2017): Just tried it with the current version, and it looks like @ElectronicWar is right. I don't know which version I was using at the time, or if if I changed any files, but thought it was worth a try.
Author
Owner

@phanan commented on GitHub (Dec 4, 2017):

Non-root installations should be OK now with the great PR from @fieteboerner (thanks again!)

<!-- gh-comment-id:348958601 --> @phanan commented on GitHub (Dec 4, 2017): Non-root installations should be OK now with the great PR from @fieteboerner (thanks again!)
Author
Owner

@tlaguz commented on GitHub (Oct 5, 2020):

It looks like it's broken in v4.4.0. I fixed it like this: bf6e7609aad229d43f5b09e82583c8fc729d3eab
After changes: ./artisan koel:init

<!-- gh-comment-id:703353909 --> @tlaguz commented on GitHub (Oct 5, 2020): It looks like it's broken in v4.4.0. I fixed it like this: bf6e7609aad229d43f5b09e82583c8fc729d3eab After changes: `./artisan koel:init`
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#374
No description provided.