server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name inbox.libraryofcode.org; ssl_certificate /etc/nginx/ssl/org.chain.crt; ssl_certificate_key /etc/nginx/ssl/org.key.pem; root /var/www/rainloop; index index.php index.html; access_log /var/log/nginx/rainloop_access.log; error_log /var/log/nginx/rainloop_error.log; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ ^/(.+\.php)$ { try_files $uri =404; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ^~ /data { deny all; } }