Files
yxt-yyth-biz/docs/tester/lpk.yyundong.com.conf
liupopo 3fd635c440 11
2023-11-23 16:26:46 +08:00

64 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
server_name lpk.yyundong.com;
client_max_body_size 1000m;
index index.html index.htm;
root /usr/share/nginx/html/lipinka/yyth-ui;
#SSL-START SSL相关配置请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
#HTTP_TO_HTTPS_START
# if ($server_port !~ 443){
# rewrite ^(/.*)$ https://$host$1 permanent;
# }
#HTTP_TO_HTTPS_END
ssl_certificate /usr/share/nginx/html/lipinka/lpk.yyundong.com.pem;
ssl_certificate_key /usr/share/nginx/html/lipinka/lpk.yyundong.com.key;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
error_page 497 https://$host$request_uri;
#SSL-END
#PROXY-START/api/
location ^~ /api/
{
proxy_pass http://172.18.0.1:17201/;
proxy_set_header Host localhost;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_file8U52I41S 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_file8U52I41S 1;
expires 1m;
}
if ( $static_file8U52I41S = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/api/
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}