leftso 1006 0 2018-08-31 20:58:56

文章位置:左搜> 编程技术> 正文

nginx代理Tomcat带路径的项目

location / {
                proxy_pass http://localhost:8080/v1/;
                proxy_set_header    REMOTE-HOST $remote_addr;
                proxy_set_header   Host $host; 
                proxy_set_header   X-Real-IP $remote_addr; 
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; 
                #root   html;
                #index  index.html;
        }

        location /v1/ {
                proxy_pass http://localhost:8080/v1/;
                proxy_set_header    REMOTE-HOST $remote_addr;
                proxy_set_header   Host $host; 
                proxy_set_header   X-Real-IP $remote_addr; 
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; 
                #root   html;
                #index  index.html;
        }
编程技术 nginx tomcat

评论区域

暂无评论,快来抢首发吧!!!