mirror of
https://github.com/nextcloud/docker.git
synced 2025-02-09 12:48:25 +01:00
add rewrite rule from official docs to nginx examples (#1635)
Without this rewrite rule you can't access some pages (like LDAP config). These lines are present in the official docs: https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html Signed-off-by: aney1 <aney1@users.noreply.github.com>
This commit is contained in:
parent
6e54048644
commit
f4dbcf523a
4 changed files with 12 additions and 0 deletions
|
@ -125,6 +125,9 @@ http {
|
||||||
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
|
# Required for legacy support
|
||||||
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,9 @@ http {
|
||||||
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
|
# Required for legacy support
|
||||||
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,9 @@ http {
|
||||||
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
|
# Required for legacy support
|
||||||
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,9 @@ http {
|
||||||
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||||
# to the URI, resulting in a HTTP 500 error response.
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
location ~ \.php(?:$|/) {
|
location ~ \.php(?:$|/) {
|
||||||
|
# Required for legacy support
|
||||||
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue