-
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
change nginx-config for subdir to resolve /ocm-provider properly #1280
Conversation
After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this redirect has to be added to the configuration signed-off by bernieo.github@gmx.de
Sorry, I forgot to add my name for the signed-off thingie. I am still new to this, please forgive me: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After having had a think about it, a internal rewrite is probably a better solution than a 301 redirect to everything under /oc(s|m)-provider
. So I would suggest changing the three lines to:
location ~ ^\/(?:ocm-provider|ocs-provider).* {
rewrite ^ /nextcloud$request_uri;
}
Edit 1: I don't know how to change this pull request though - should I open a new one?
Edit 2: As you can see I did manage to change the pull request :-)
signed-off-by Bernhard Ostertag <bernieo.github@gmx.de> After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. Your web server is not properly set up to resolve “/ocs-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this rewrite has to be added to the nignx configuration when running nextcloud in a subdirectory of webroot
signed-off-by Bernhard Ostertag <bernio.github@gmx.de> After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. Your web server is not properly set up to resolve “/ocs-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this rewrite has to be added to the nignx configuration when running nextcloud in a subdirectory of webroot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense 👍
cc @josh4trunks |
/backport to stable15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense
backport to stable15 in #1291 |
@BernieO just wondering why a rewrite is preferred over a 301? Just to nitpick, regarding the current code, there is no need to have the at the end of the location, that is assumed to be there. I suggest a slight modification...
|
Find my answer here: #1292 |
Hi everyone in here - it turns out that the setup check here is wrong. Both |
After upgrading to 15.0.5 this is shown in the Admin-panel:
I think for runnning nextcloud in a subdirectory of webroot, this redirect has to be added to the configuration
Also see here: https://help.nextcloud.com/t/your-web-server-is-not-properly-set-up-to-resolve-ocm-provider/48530
And here: nextcloud/server#14445
signed-off by bernieo.github@gmx.de