nginx 实现访问www.abc.com 到www/abc.com/def效果
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回复。