Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. [root@leidenrp ~]# cat /etc/nginx/conf.d/pterodactyl.conf
  2.  
  3. server {
  4. listen 80;
  5. server_name panel.leidenrp.ga;
  6. return 301 https://$server_name$request_uri;
  7. }
  8.  
  9. server {
  10. listen 443 ssl http2;
  11. server_name panel.leidenrp.ga;
  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. # strengthen ssl security
  26. ssl_certificate /etc/letsencrypt/live/panel.leidenrp.ga/fullchain.pem;
  27. ssl_certificate_key /etc/letsencrypt/live/panel.leidenrp.ga/privkey.pem;
  28. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  29. ssl_prefer_server_ciphers on;
  30. ssl_session_cache shared:SSL:10m;
  31. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  32.  
  33. # See the link below for more SSL information:
  34. # https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
  35. #
  36. # ssl_dhparam /etc/ssl/certs/dhparam.pem;
  37.  
  38. # Add headers to serve security related headers
  39. add_header Strict-Transport-Security "max-age=15768000; preload;";
  40. add_header X-Content-Type-Options nosniff;
  41. add_header X-XSS-Protection "1; mode=block";
  42. add_header X-Robots-Tag none;
  43. add_header Content-Security-Policy "frame-ancestors self";
  44.  
  45. location / {
  46. try_files $uri $uri/ /index.php?$query_string;
  47. }
  48.  
  49. location ~ \.php$ {
  50. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  51. fastcgi_pass unix:/var/run/php-fpm/pterodactyl.sock;
  52. fastcgi_index index.php;
  53. include fastcgi_params;
  54. fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
  55. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  56. fastcgi_param HTTP_PROXY "";
  57. fastcgi_intercept_errors off;
  58. fastcgi_buffer_size 16k;
  59. fastcgi_buffers 4 16k;
  60. fastcgi_connect_timeout 300;
  61. fastcgi_send_timeout 300;
  62. fastcgi_read_timeout 300;
  63. include /etc/nginx/fastcgi_params;
  64. }
  65.  
  66. location ~ /\.ht {
  67. deny all;
  68. }
  69. }
  70.  
  71. [root@leidenrp ~]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement