diff --git a/source/_posts/2012-06-03-owncloud-4-and-nginx.markdown b/source/_posts/2012-06-03-owncloud-4-and-nginx.markdown index 6d3ff5e..d4175ee 100644 --- a/source/_posts/2012-06-03-owncloud-4-and-nginx.markdown +++ b/source/_posts/2012-06-03-owncloud-4-and-nginx.markdown @@ -47,6 +47,11 @@ server { access_log off; } + # deny direct access + location ~ ^/(data|config|\.ht|db_structure.xml|README) { + deny all; + } + location / { # these line replace the rewrite made in owncloud .htaccess try_files $uri $uri/ @webdav; @@ -60,11 +65,10 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } - location ~ .php$ { + location ~ \.php$ { include fastcgi_params; fastcgi_pass backend; fastcgi_param HTTPS on; - fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }