Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen 443 ssl http2;
- server_name forum.example.com;
- root /var/www/vanilla;
- index index.php;
- # RSA
- ssl_certificate /etc/letsencrypt/example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/example.com/private.key;
- # ECC
- ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;
- 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 ~* ^/index\.php(/|$) {
- include snippets/fastcgi-php.conf;
- fastcgi_param SCRIPT_NAME /index.php;
- fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
- fastcgi_param X_REWRITE 1;
- fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- }
- location ~* \.php(/|$) {
- rewrite ^ /index.php$uri last;
- }
- location / {
- try_files $uri $uri/ @vanilla;
- }
- location @vanilla {
- rewrite ^ /index.php$uri last;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement