#
# A virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 80;
server_name test.jiayuan.aomygod.com;
location / {
root /app/svr/server/html;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
location /home {
alias /app/svr/server/jiayuan_home;
index index.html index.htm;
}
location /wechats {
rewrite ^/wechats/(.*) /$1 break;
proxy_pass http://127.0.0.1:10060;
proxy_set_header X-Real-IP $remote_addr;
}
location /nexus {
proxy_pass http://10.249.200.23:8081/nexus;
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 /beautiful-district {
proxy_set_header X-Real-IP $remote_addr;
expires -1;
add_header Cache-Control no-cache;
alias /app/svr/server/web/district/district/dist;
index index.html index.htm;
#try_files $uri $uri/ /app/svr/server/web/district/index.html;
}
location /beautiful-district-vote {
proxy_set_header X-Real-IP $remote_addr;
expires -1;
add_header Cache-Control no-cache;
alias /app/svr/server/web/district-vote/district_vote/dist;
index index.html index.htm;
#try_files $uri $uri/ /app/svr/server/web/district/index.html;
}
location /district-api {
proxy_pass http://127.0.0.1:11000/;
proxy_set_header X-Real-IP $remote_addr;
}
location /jyh5 {
rewrite ^/jyh5/h5-api/(.*) /h5-api/$1 break;
proxy_pass http://127.0.0.1:6080/h5-api/;
proxy_set_header X-Real-IP $remote_addr;
}
location /merchant-sale-report {
# rewrite ^/u/(.*) /h5-api/$1 break;
proxy_pass http://127.0.0.1:10002/;
proxy_set_header X-Real-IP $remote_addr;
}
location /jiangmen-sale-report {
client_max_body_size 20M;
expires -1;
add_header Cache-Control no-cache;
alias /app/svr/server/web/merchant-report/merchant-sale-project/dist;
try_files $uri $uri/ /jiangmen-sale-report/index.html;
}
location /panyu-mp-points {
expires -1;
add_header Cache-Control no-cache;
alias /app/svr/server/web/panyu-mp-points/mp-points/dist;
index index.html index.htm;
try_files $uri $uri/ /panyu-mp-points/index.html;
}
location /mp-points {
expires -1;
add_header Cache-Control no-cache;
alias /app/svr/server/web/mp-points/dist;
index index.html index.htm;
try_files $uri $uri/ /mp-points/index.html;
}
location /oauth-mp-points {
alias /app/svr/server/web/oauth-mp-points/mp-points/dist;
index index.html index.htm;
try_files $uri $uri/ /oauth-mp-points/index.html;
}
location /wechat-code {
alias /app/svr/server/web/wechat-code;
index index.html index.htm;
}
}
nginx 配置样式
最新推荐文章于 2024-05-23 11:22:18 发布