docker/nginx/vhosts/hhz.conf

66 lines
2.0 KiB
Plaintext
Raw Normal View History

2025-05-15 13:02:53 +08:00
server
{
listen 80;
listen 443 ssl;
server_name hhz.t-aaron.com hhztest.t-aaron.com;
root /data/tuoheng_hhz_web/dist;
# SSL证书配置
ssl_certificate /etc/nginx/t-aaron.com.pem;
ssl_certificate_key /etc/nginx/t-aaron.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
#开启gzip功能
gzip on;
gzip_min_length 10k;
gzip_comp_level 9;
gzip_types text/plain text/css application/javascript application/x-javascript text/javascript application/xml application/octet-stream application/msword;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
charset UTF-8;
proxy_send_timeout 150s; # 设置发送超时时间,
proxy_read_timeout 150s; # 设置读取超时时间。
location / {
try_files $uri $uri/ @router;
index index.html;
}
location @router {
rewrite ^.*$ /index.html last;
}
#location /api {
# proxy_pass http://127.0.0.1:9055/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;
#}
location /permission {
proxy_pass http://tuoheng_hhz_admin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /wxapp {
proxy_pass http://tuoheng_hhz_api/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;
}
location /hhz {
proxy_pass http://gatewayService/hhz;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}