Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. server {
  2. listen 443 ssl http2;
  3. listen [::]:443 ssl http2;
  4. server_name ~^(www.)?enlightenmc.net;
  5.  
  6. # This depends on where you want to install nameless on file.
  7. root /var/nginxsites/enlightenmc.net;
  8. index index.php;
  9.  
  10. # Logging
  11. error_log /var/nginxsites/enlightenmc.net/error.log warn;
  12. access_log /var/nginxsites/enlightenmc.net/access.log;
  13.  
  14. # allow larger file uploads and longer script runtimes
  15. client_max_body_size 128M;
  16. client_body_timeout 300s;
  17.  
  18. # Sets the SSL Certificate, ciphers & more
  19. ssl_certificate <my cert path, redacted>;
  20. ssl_certificate_key <my cert path, redacted>;
  21.  
  22. # Serves security related headers
  23. add_header Strict-Transport-Security "max-age=15768000; preload;";
  24. add_header X-Content-Type-Options nosniff;
  25. add_header X-XSS-Protection "1; mode=block";
  26. add_header X-Robots-Tag none;
  27. add_header Content-Security-Policy "frame-ancestors 'self'";
  28.  
  29. location / {
  30. try_files $uri $uri/ /index.php?$args;
  31. }
  32.  
  33. location ~ \.php$ {
  34. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  35. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  36. # This greatly depends on where php fpm is located
  37. # It can be /var/run/php5/php-fpm.sock or 127.0.0.1:9000 or others.
  38. fastcgi_index index.php;
  39. include fastcgi_params;
  40. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  41. include /etc/nginx/fastcgi_params;
  42. }
  43.  
  44. error_page 404 /404.php;
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement