-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nginx config handles routes with embedded .php
in them differently than apache config
#11951
Comments
After investigating another issue with album art (covers) not displayed in Power Ampache 2, it appears new location should be changed from " As album art may retrieved using such URL : See this issue for more information : owncloud/music#1156 |
Looks like the fundamental matter is two-fold:
Preferably we find an an approach that doesn't such a app specific rule to the general config if we can avoid it. Let's try to figure out what we're doing different in the nginx config versus the Apache configs since apparently it works there? The closest counterpart I can think of is the
Out of curiosity, does the following also work fix this? rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode(_arm64)?\/proxy|.+\/music?\/ampache) /index.php$request_uri; Still would prefer a generic way, so just gathering info at the moment. |
.php
in them differently than apache config
Hi, The rewrite rules proposed does work. Tested for both connecting from Ampache client and also displaying cover art : |
I am sorry, I did a mistake :
And this one works : the Ampache client can connect. NOTE : this line was not present in my default configuration file ( But using the one proposed and modified for ampache :
I initially thought both lines were the same (read to fast). Sorry for the misunderstanding. |
Using Power Ampache 2 android client to connect to my Nextcloud Music App, I was unable to connect due to nginx error.
92.xxx.yyy.zzz - - [23/Jun/2024:18:11:56 +0200] "GET /apps/music/ampache/server/json.server.php?action=handshake&auth=0dc8eab854xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx289e9ded5423&user=xxxxxxx×tamp=1719159117 HTTP/2.0" 404 146 "-" "PowerAmpache2-1.00-60-fdroid"
It appears that issue is related to try_files directive in the nginx configuration file when using Ampache API, like described here : Ampache api with nextcloud served by nginx gets 404 when following nextcloud admin docs.
After some help from Ampache dev (see here), adding a new location for
/apps/music/ampache/server/
like below setting in nginx configuration file solves the issue :So it would probably be good to amend the following documentation with the above example, probably in the following documentation : https://docs.nextcloud.com/server/21/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx, in the Tips and Tricks section, when using Nextcloud Music App from Ampache client and using nginx as proxy server.
Note I was using the following versions when experiencing this issue :
Running docker images provided by Linuxserver.io . File modified is
Nextcloud/config/nginx/site-confs/default.conf
The text was updated successfully, but these errors were encountered: