nginx 实现访问www.abc.com 到www/abc.com/def效果

3年前 (2017-06-09) gtj linux, lnmp 0评论 已收录 235℃
server {
        listen       80;
        root      /test;
       
        server_name www.abc.com;
        proxy_set_header HOST $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        index login.jsp;
       location ~* {
           if ( $uri = / ) {
           rewrite ^/ /def/jsp last;
            }
            proxy_set_header X-Forwarded-Proto https;
            proxy_pass   http://127.0.0.1:7001;
        }


  }


博主

这货来去如风,什么鬼都没留下!!!

相关推荐

嗨、骚年、快来消灭0回复。

×
订阅图标按钮
Less is more!!!