diff --git a/admin_manual/installation_webservernotes.rst b/admin_manual/installation_webservernotes.rst index d920c0bf2..8d47e222c 100644 --- a/admin_manual/installation_webservernotes.rst +++ b/admin_manual/installation_webservernotes.rst @@ -23,7 +23,7 @@ Nginx Configuration server { listen 80; server_name owncloud.example.org; - rewrite ^ https://$server_name$request_uri? permanent; # enforce https + return 301 https://$server_name$request_uri; # enforce https } # owncloud (ssl/tls) @@ -37,7 +37,7 @@ Nginx Configuration client_max_body_size 1000M; # set maximum upload size # deny direct access - location ^ ^/(data|config|\.ht|db_structure\.xml|README) { + location ~ ^/(data|config|\.ht|db_structure\.xml|README) { deny all; } @@ -56,7 +56,8 @@ Nginx Configuration } # enable php - location ^ \.php$ { + location ~ \.php$ { + try_files $uri = 404 fastcgi_pass 127.0.0.1:9000; # or use php-fpm with: "unix:/var/run/php-fpm/php-fpm.sock;" fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTPS on;