45 lines
1.6 KiB
Nginx Configuration File
45 lines
1.6 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
ssl_certificate /usr/local/nginx/conf/ssl/your-domain-name.crt;
|
|
ssl_certificate_key /usr/local/nginx/conf/ssl/your-domain-name.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
|
|
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256;
|
|
ssl_conf_command Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256;
|
|
ssl_conf_command Options PrioritizeChaCha;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_timeout 10m;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_buffer_size 2k;
|
|
add_header Strict-Transport-Security max-age=15768000;
|
|
server_name your-domain-name;
|
|
access_log /data/wwwlogs/your-domain-name_nginx.log combined;
|
|
index index.html index.htm index.php;
|
|
root /data/wwwroot/your-domain-name;
|
|
if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
|
|
|
|
include /usr/local/nginx/conf/rewrite/other.conf;
|
|
#error_page 404 /404.html;
|
|
#error_page 502 /502.html;
|
|
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_buffering off;
|
|
proxy_pass http://localhost:8066;
|
|
}
|
|
|
|
location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
|
|
deny all;
|
|
}
|
|
|
|
location /.well-known {
|
|
allow all;
|
|
}
|
|
}
|