diff options
author | aney1 <aney1@users.noreply.github.com> | 2021-11-25 14:04:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 13:04:39 +0000 |
commit | f4dbcf523a27ba240b29dcf92b24d0c20544b42d (patch) | |
tree | 832f1780ad201f4141b3be076558c642b910afa5 /.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf | |
parent | 6e54048644d7572f5fe9366329f18edc4d3de643 (diff) |
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>
Diffstat (limited to '.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf')
-rw-r--r-- | .examples/docker-compose/insecure/postgres/fpm/web/nginx.conf | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf index ef8229c1..8fbc162b 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf +++ b/.examples/docker-compose/insecure/postgres/fpm/web/nginx.conf @@ -125,6 +125,9 @@ http { # then Nginx will encounter an infinite rewriting loop when it prepends `/index.php` # to the URI, resulting in a HTTP 500 error response. 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)(/.*)$; set $path_info $fastcgi_path_info; |