# ownCloud server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /srv/nextcloud; index index.php; client_max_body_size 20M; location ~ ^/(data|config|\.ht|db_structure\.xml|README) { deny all; } location / { try_files $uri $uri/ index.php; } location ~ \.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_pass unix:/var/run/php5-fpm.sock; } }