如果nginx下面这样的配置我访问http://kaipizhe.com这个时候request.getRequestURI();这个值是/kaipizhe/而不是/我访问http://kaipizhe.com/all/这个时候request.getRequestURI();这个值是/kaipizhe/all/而不是/all/就是request.getRequestURI();都会带上/kaipizhe/,怎么让他直接是/,是不是我nginx配置有问题,应该怎么处理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;}
添加回答
举报
0/150
提交
取消