nginx相同域名下不同路径的转发
2018-05-22 本文已影响0人
炒面Z
server {
listen 80;
server_name xxx.xxx.cn;
location ~* /eureka {
rewrite /eureka/(.*) /$1 break;
rewrite /eureka /$1 break;
proxy_pass http://172.16.49.229:8001;
}
location ~* /admin {
rewrite /admin/(.*) /$1 break;
rewrite /admin /$1 break;
proxy_pass http://172.16.49.229:8001;
}
location ~* /crm {
rewrite /crm/(.*) /$1 break;
rewrite /crm /$1 break;
proxy_pass http://172.16.49.229:8001;
}
location ~* /config-server {
rewrite /config-server/(.*) /$1 break;
rewrite /config-server /$1 break;
proxy_pass http://172.16.49.229:8001;
}
}