Advertisement
Atom888

Untitled

May 30th, 2022
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. server_tokens off;
  2.  
  3. server {
  4. listen 80;
  5. server_name mc.private.orbyfied.net;
  6. return 301 https://$server_name$request_uri;
  7. }
  8.  
  9. server {
  10. listen 443 ssl http2;
  11. server_name mc.private.orbyfied.net;
  12.  
  13. root /var/www/pterodactyl/public;
  14. index index.php;
  15.  
  16. access_log /var/log/nginx/pterodactyl.app-access.log;
  17. error_log /var/log/nginx/pterodactyl.app-error.log error;
  18.  
  19. # allow larger file uploads and longer script runtimes
  20. client_max_body_size 100m;
  21. client_body_timeout 120s;
  22.  
  23. sendfile off;
  24.  
  25. # SSL Configuration - Replace the example <domain> with your domain
  26. ssl_certificate /etc/nginx/certs/publickey.pem;
  27. ssl_certificate_key /etc/nginx/certs/privatekey.pem;
  28. ssl_session_cache shared:SSL:10m;
  29. ssl_protocols TLSv1.2 TLSv1.3;
  30. ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
  31. ssl_prefer_server_ciphers on;
  32.  
  33. # See https://hstspreload.org/ before uncommenting the line below.
  34. # add_header Strict-Transport-Security "max-age=15768000; preload;";
  35. add_header X-Content-Type-Options nosniff;
  36. add_header X-XSS-Protection "1; mode=block";
  37. add_header X-Robots-Tag none;
  38. add_header Content-Security-Policy "frame-ancestors 'self'";
  39. add_header X-Frame-Options DENY;
  40. add_header Referrer-Policy same-origin;
  41.  
  42. location / {
  43. try_files $uri $uri/ /index.php?$query_string;
  44. }
  45.  
  46. location ~ \.php$ {
  47. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  48. fastcgi_pass unix:/run/php/php8.1-fpm.sock;
  49. fastcgi_index index.php;
  50. include fastcgi_params;
  51. fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
  52. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53. fastcgi_param HTTP_PROXY "";
  54. fastcgi_intercept_errors off;
  55. fastcgi_buffer_size 16k;
  56. fastcgi_buffers 4 16k;
  57. fastcgi_connect_timeout 300;
  58. fastcgi_send_timeout 300;
  59. fastcgi_read_timeout 300;
  60. include /etc/nginx/fastcgi_params;
  61. }
  62.  
  63. location ~ /\.ht {
  64. deny all;
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement