加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nginx.conf 2.44 KB
一键复制 编辑 原始数据 按行查看 历史
zhangxinya 提交于 2020-06-18 08:31 . first add
worker_processes 4;
events {
worker_connections 1024;
}
http {
client_max_body_size 100m;
include mime.types;
default_type application/octet-stream;
sendfile on;
map $http_upgrade $connection_upgrade {
default upgrade;
}
upstream @identity{
server 10.13.0.117:5105 max_fails=1 fail_timeout=300;
}
upstream @api{
server 10.13.0.117:29314 max_fails=1 fail_timeout=300;
}
upstream @waswebserver{
server 10.13.0.117:29314 max_fails=1 fail_timeout=300;
}
upstream @wasServer{
server 10.13.0.117:8080 max_fails=1 fail_timeout=300;
}
server {
listen 4203;
root D:/AngularWeb;
location / {
try_files $uri /index.html;
}
location ~ ^/identity/* {
rewrite ^/identity/(.*) /$1 break;
proxy_redirect ~^http://10.13.0.117(.*) http://10.13.0.117:5105$1;
proxy_pass http://@identity;
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_connect_timeout 10s;
proxy_read_timeout 3600s;
}
location ~ ^/api/* {
rewrite ^/api/(.*) /$1 break;
proxy_redirect ~^http://10.13.0.117(.*) http://10.13.0.117:29314$1;
proxy_pass http://@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_connect_timeout 10s;
proxy_read_timeout 3600s;
}
location ~ ^/waswebserver/* {
rewrite ^/waswebserver/(.*) /$1 break;
proxy_redirect ~^http://10.13.0.117(.*) http://10.13.0.117:29314$1;
proxy_pass http://@waswebserver;
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_connect_timeout 10s;
proxy_read_timeout 3600s;
}
location ~ ^/wasServer/* {
rewrite ^/wasServer/(.*) /$1 break;
proxy_redirect ~^http://10.13.0.117(.*) http://10.13.0.117:8080$1;
proxy_pass http://@wasServer;
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_connect_timeout 10s;
proxy_read_timeout 3600s;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化