Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- server_name ~^(www.)?enlightenmc.net;
- # This depends on where you want to install nameless on file.
- root /var/nginxsites/enlightenmc.net;
- index index.php;
- # Logging
- error_log /var/nginxsites/enlightenmc.net/error.log warn;
- access_log /var/nginxsites/enlightenmc.net/access.log;
- # allow larger file uploads and longer script runtimes
- client_max_body_size 128M;
- client_body_timeout 300s;
- # Sets the SSL Certificate, ciphers & more
- ssl_certificate <my cert path, redacted>;
- ssl_certificate_key <my cert path, redacted>;
- # Serves security related headers
- add_header Strict-Transport-Security "max-age=15768000; preload;";
- add_header X-Content-Type-Options nosniff;
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- add_header Content-Security-Policy "frame-ancestors 'self'";
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- # This greatly depends on where php fpm is located
- # It can be /var/run/php5/php-fpm.sock or 127.0.0.1:9000 or others.
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- error_page 404 /404.php;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement