From 62d2c2da9f92f09be5f4e8de54caf1bd85d3a8b3 Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 2 Nov 2021 00:45:32 -0400 Subject: [PATCH] Update install.sh --- install.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 8d48f8c..8232887 100644 --- a/install.sh +++ b/install.sh @@ -567,34 +567,35 @@ server { server_name '"$FQDN"'; root /var/www/pterodactyl/public; index index.php; + access_log /var/log/nginx/pterodactyl.app-access.log; error_log /var/log/nginx/pterodactyl.app-error.log error; + # allow larger file uploads and longer script runtimes client_max_body_size 100m; client_body_timeout 120s; - + sendfile off; - # strengthen ssl security ssl_certificate /etc/letsencrypt/live/'"$FQDN"'/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/'"$FQDN"'/privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; - 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"; + ssl_protocols TLSv1.2 TLSv1.3; + 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"; + ssl_prefer_server_ciphers on; - # See the link below for more SSL information: - # https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - # - # ssl_dhparam /etc/ssl/certs/dhparam.pem; - # Add headers to serve security related headers - add_header Strict-Transport-Security "max-age=15768000; preload;"; + # See https://hstspreload.org/ before uncommenting the line below. + # 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'"; + add_header X-Frame-Options DENY; + add_header Referrer-Policy same-origin; + location / { try_files $uri $uri/ /index.php?$query_string; } + location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php-fpm/pterodactyl.sock; @@ -611,6 +612,7 @@ server { fastcgi_read_timeout 300; include /etc/nginx/fastcgi_params; } + location ~ /\.ht { deny all; }