55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
# generated 2024-06-16, Mozilla Guideline v5.7, nginx 1.18.0, OpenSSL 3.0.2, modern configuration
|
|
# https://ssl-config.mozilla.org/#server=nginx&version=1.18.0&config=modern&openssl=3.0.2&guideline=5.7
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name api.tradewind.vip;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name api.tradewind.vip;
|
|
|
|
root /var/www/http/tradewind-api/public;
|
|
|
|
index index.php;
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/tradewind.vip/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tradewind.vip/privkey.pem;
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
|
ssl_session_tickets off;
|
|
|
|
# modern configuration
|
|
ssl_protocols TLSv1.3;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
|
|
# replace with the IP address of your resolver
|
|
resolver 223.5.5.5;
|
|
}
|
|
|
|
|