55# This is because we've self-signed an SSL certificate for this IP.
66# You'll need to tell your browser to allow the invalid SSL cert.
77
8- #Configuration note:
9- # The listen parameters "deferred fastopen=256 reuseport" can only be enabled in a single vhost at a time.
10- # They may result in some performance boost on a production site, but testing on your specific site is recommended.
11- # If you'd like to test this, you'll need to remove it from this file and add it to /etc/nginx/sites-enabled/YOURDOMAIN.TLD.conf.
12-
138server {
149 listen 80 deferred fastopen=256 reuseport;
1510 listen [::]:80 deferred fastopen=256 reuseport;
@@ -20,9 +15,15 @@ server {
2015}
2116
2217server {
23- listen 443 ssl deferred fastopen=256 reuseport;
24- listen [::]:443 ssl deferred fastopen=256 reuseport;
25- server_name localhost;
18+ # HTTP2
19+ listen 443 default_server ssl reuseport fastopen=256 deferred;
20+ listen [::]:443 default_server ssl reuseport fastopen=256 deferred;
21+
22+ # HTTP3 / QUIC
23+ #listen 443 default_server quic reuseport;
24+ #listen [::]:443 default_server quic reuseport;
25+
26+ server_name _;
2627
2728 # SSL Certs
2829 ssl_verify_client optional_no_ca;
@@ -34,10 +35,10 @@ server {
3435 ssl_buffer_size 1369;
3536 ssl_protocols TLSv1.2 TLSv1.3;
3637 ssl_session_cache shared:SSL:5m;
37- ssl_session_tickets off ;
38+ ssl_session_tickets on ;
3839 ssl_session_timeout 1h;
3940
40- root /var/www/admin/enginescript ;
41+ root /var/www/admin;
4142
4243 # Admin Control Panel Protection
4344 # Adds a second layer of password protection to any admin location page such as phpMyAdmin
@@ -52,14 +53,21 @@ server {
5253 fastcgi_cache off;
5354 set $skip_cache 1;
5455
55- # EngineScript Control Panel - Default Location
56+ # Direct IP Access - Return 204 No Content
5657 location / {
57- try_files $uri $uri/ /index.html =404;
58+ return 204;
59+ }
60+
61+ # EngineScript Control Panel - Admin Directory
62+ location /admin {
63+ alias /var/www/admin/enginescript;
64+ index index.html index.php;
65+ try_files $uri $uri/ /admin/index.html =404;
5866 }
5967
6068 # API Endpoints for EngineScript Control Panel
6169 location /api {
62- rewrite ^/api/(.*)$ /api.php?endpoint=$1 last;
70+ rewrite ^/api/(.*)$ /enginescript/ api.php?endpoint=$1 last;
6371 }
6472
6573 # Development and Debug
0 commit comments