mirror of
https://github.com/nextcloud/documentation.git
synced 2025-10-26 11:18:02 +00:00
Merge pull request #1676 from nextcloud/backport/1674/stable16
[stable16] Harden NGINX config
This commit is contained in:
commit
0f65a7543e
@ -118,7 +118,7 @@ webroot of your nginx installation. In this example it is
|
||||
#pagespeed off;
|
||||
|
||||
location / {
|
||||
rewrite ^ /index.php$request_uri;
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
|
||||
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
||||
@ -130,6 +130,7 @@ webroot of your nginx installation. In this example it is
|
||||
|
||||
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
@ -280,7 +281,7 @@ your nginx installation.
|
||||
#pagespeed off;
|
||||
|
||||
location /nextcloud {
|
||||
rewrite ^ /nextcloud/index.php$request_uri;
|
||||
rewrite ^ /nextcloud/index.php;
|
||||
}
|
||||
|
||||
location ~ ^\/nextcloud\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
||||
@ -292,6 +293,7 @@ your nginx installation.
|
||||
|
||||
location ~ ^\/nextcloud\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user