server { charset utf-8; listen 443 ssl http2; listen [::]:443 ssl http2; root /var/www/html/PrivateBin; server_name gist.valentineus.link; access_log off; error_log /var/log/nginx/gist/error.log warn; location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ { access_log off; expires 30d; } location ~ ^/(data|cfg|tmp) { deny all; } location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ { deny all; } location ~ /\. { deny all; } location ~ [^/]\.(php|html|htm)(/|$) { include fastcgi_params; fastcgi_pass unix:/run/php/php7.3-fpm.sock; fastcgi_index index.php; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_split_path_info ^(.+\.php)(/.+)$; } location / { index index.php; try_files $uri $uri/ /index.php; } }