Created
December 12, 2024 10:38
-
-
Save serverok/94bd657011f0f85c93f00f0e79e006b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen *:443 ssl; | |
| server_name DOMAINNAME www.DOMAINNAME ; | |
| root /var/www/verifier/; | |
| index index.php index.html index.htm; | |
| access_log /var/log/nginx/DOMAINNAME.log; | |
| error_log /var/log/nginx/DOMAINNAME.error.log; | |
| ssl_certificate /etc/letsencrypt/live/DOMAINNAME/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/DOMAINNAME/privkey.pem; | |
| ssl_stapling on; | |
| ssl_stapling_verify on; | |
| # TLS 1.3 0-RTT anti-replay | |
| if ($anti_replay = 307) { return 307 https://$host$request_uri; } | |
| if ($anti_replay = 425) { return 425; } | |
| location ~ /\.(?!well-known\/) { | |
| deny all; | |
| return 404; | |
| } | |
| location / { | |
| location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ { | |
| expires max; | |
| fastcgi_hide_header "Set-Cookie"; | |
| } | |
| location ~ [^/]\.php(/|$) { | |
| try_files $uri =404; | |
| include /etc/nginx/fastcgi_params; | |
| fastcgi_index index.php; | |
| fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_pass unix:/run/php/verifier.sock; | |
| } | |
| } | |
| proxy_hide_header Upgrade; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment