Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root /srv/vanilla;
- # Add index.php to the list if you are using PHP
- index index.php;
- # Block some folders as an extra hardening measure.
- location ~* "/\.git" { deny all; return 403; }
- location ~* "^/build/" { deny all; return 403; }
- location ~* "^/cache/" { deny all; return 403; }
- location ~* "^/cgi-bin/" { deny all; return 403; }
- location ~* "^/uploads/import/" { deny all; return 403; }
- location ~* "^/conf/" { deny all; return 403; }
- location ~* "^/tests/" { deny all; return 403; }
- location ~* "^/vendor/" { deny all; return 403; }
- location ^~ "/favicon.ico" { access_log off; log_not_found off; return 404; }
- # This handles all the main requests thru index.php.
- location ~ \.php$ {
- # send to fastcgi
- include fastcgi.conf;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/run/php/php7.3-fpm.sock;
- }
- location / {
- try_files $uri $uri/ /index.php$uri;
- }
- location ~ /\.ht {
- deny all;
- }
Add Comment
Please, Sign In to add comment