如果nginx下面這樣的配置我訪問http://kaipizhe.com這個(gè)時(shí)候request.getRequestURI();這個(gè)值是/kaipizhe/而不是/我訪問http://kaipizhe.com/all/這個(gè)時(shí)候request.getRequestURI();這個(gè)值是/kaipizhe/all/而不是/all/就是request.getRequestURI();都會(huì)帶上/kaipizhe/,怎么讓他直接是/,是不是我nginx配置有問題,應(yīng)該怎么處理nginxlog_formatkaipizhe.com'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$http_user_agent"$http_x_forwarded_for';server{listen80;server_namekaipizhe.com;root/usr/local/tomcat/webapps/kaipizhe;includenone.conf;location/{proxy_passhttp://localhost:8080/kaipizhe/;proxy_cookie_path/kaipizhe/;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_redirecthttp://localhost:8080/kaipizhe/http://kaipizhe.com/;}location~.*\.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*\.(js|css)?${expires12h;}access_log/home/wwwlogs/kaipizhe.com.logkaipizhe.com;}
Nginx 代理 Tomcat 問題 request.getRequestURI(); 怎么讓他不帶項(xiàng)目名
慕哥9229398
2019-04-10 20:49:22