fixed nginx config because of a security issue

This commit is contained in:
nd 2019-10-25 10:51:48 +02:00
parent c67ac33467
commit e729f386c4
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -26,7 +26,7 @@ server {
} }
location / { location / {
rewrite ^ /index.php$request_uri; rewrite ^ /index.php;
} }
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
@ -38,6 +38,7 @@ server {
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) { location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $fastcgi_script_name =404;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;