美文网首页
nginx相同域名下不同路径的转发

nginx相同域名下不同路径的转发

作者: 炒面Z | 来源:发表于2018-05-22 14:35 被阅读0次
    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;
        }
    
    }
    

    相关文章

      网友评论

          本文标题:nginx相同域名下不同路径的转发

          本文链接:https://www.haomeiwen.com/subject/sjwhjftx.html