170 lines
4.6 KiB
INI
170 lines
4.6 KiB
INI
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name donghy.top www.donghy.top;
|
||
|
|
return 301 https://$host$request_uri;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name 110.42.255.239;
|
||
|
|
|
||
|
|
location /ui {
|
||
|
|
alias /var/www/UI/RustUI/dist-docs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /weixin/log {
|
||
|
|
alias /var/www/node/deploy_logs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /ui/log {
|
||
|
|
alias /var/www/UI/deploy_logs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name git.donghy.top;
|
||
|
|
return 301 https://$host$request_uri;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl http2;
|
||
|
|
server_name git.donghy.top;
|
||
|
|
|
||
|
|
ssl_certificate /etc/nginx/ssl/donghy.top_bundle.pem;
|
||
|
|
ssl_certificate_key /etc/nginx/ssl/donghy.top.key;
|
||
|
|
|
||
|
|
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;
|
||
|
|
ssl_prefer_server_ciphers off;
|
||
|
|
|
||
|
|
ssl_session_cache shared:SSL:10m;
|
||
|
|
ssl_session_timeout 10m;
|
||
|
|
ssl_session_tickets off;
|
||
|
|
|
||
|
|
ssl_stapling on;
|
||
|
|
ssl_stapling_verify on;
|
||
|
|
|
||
|
|
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
||
|
|
resolver_timeout 5s;
|
||
|
|
|
||
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||
|
|
add_header X-Frame-Options DENY;
|
||
|
|
add_header X-Content-Type-Options nosniff;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://110.42.255.239:3000;
|
||
|
|
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_set_header X-Forwarded-Proto $scheme;
|
||
|
|
|
||
|
|
proxy_connect_timeout 60s;
|
||
|
|
proxy_send_timeout 60s;
|
||
|
|
proxy_read_timeout 60s;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl http2;
|
||
|
|
server_name donghy.top www.donghy.top;
|
||
|
|
|
||
|
|
ssl_certificate /etc/nginx/ssl/donghy.top_bundle.pem;
|
||
|
|
ssl_certificate_key /etc/nginx/ssl/donghy.top.key;
|
||
|
|
|
||
|
|
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;
|
||
|
|
ssl_prefer_server_ciphers off;
|
||
|
|
|
||
|
|
ssl_session_cache shared:SSL:10m;
|
||
|
|
ssl_session_timeout 10m;
|
||
|
|
ssl_session_tickets off;
|
||
|
|
|
||
|
|
ssl_stapling on;
|
||
|
|
ssl_stapling_verify on;
|
||
|
|
|
||
|
|
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
||
|
|
resolver_timeout 5s;
|
||
|
|
|
||
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||
|
|
add_header X-Frame-Options DENY;
|
||
|
|
add_header X-Content-Type-Options nosniff;
|
||
|
|
|
||
|
|
keepalive_timeout 65;
|
||
|
|
keepalive_requests 100;
|
||
|
|
|
||
|
|
tcp_nodelay on;
|
||
|
|
tcp_nopush on;
|
||
|
|
|
||
|
|
location /img/ {
|
||
|
|
alias /var/www/node/services/public/uploads/;
|
||
|
|
expires 30d;
|
||
|
|
add_header Cache-Control "public, immutable";
|
||
|
|
add_header Access-Control-Allow-Origin *;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /api/ {
|
||
|
|
proxy_pass http://127.0.0.1:3006/api/;
|
||
|
|
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_set_header X-Forwarded-Proto $scheme;
|
||
|
|
|
||
|
|
proxy_connect_timeout 60s;
|
||
|
|
proxy_send_timeout 60s;
|
||
|
|
proxy_read_timeout 60s;
|
||
|
|
|
||
|
|
proxy_buffer_size 4k;
|
||
|
|
proxy_buffers 4 32k;
|
||
|
|
proxy_busy_buffers_size 64k;
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
root /var/www/html;
|
||
|
|
index index.html index.htm;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /ui {
|
||
|
|
alias /var/www/UI/RustUI/dist-docs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /weixin/log {
|
||
|
|
alias /var/www/node/deploy_logs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /ui/log {
|
||
|
|
alias /var/www/UI/deploy_logs/;
|
||
|
|
index index.html index.htm;
|
||
|
|
autoindex on;
|
||
|
|
autoindex_localtime on;
|
||
|
|
expires -1;
|
||
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|