为什么我的用于隐藏jsp扩展的nginx配置没有';你不能正常工作吗?
我用follow设置配置我的nginxweb服务器,它隐藏.jsp扩展名,但不显示我的页面为什么我的用于隐藏jsp扩展的nginx配置没有';你不能正常工作吗?,nginx,rewrite,hide,Nginx,Rewrite,Hide,我用follow设置配置我的nginxweb服务器,它隐藏.jsp扩展名,但不显示我的页面 location ~ \.(jsp)$ { proxy_pass http://192.168.2.225:9595; if ($request_filename ~* ^(.*).jsp$) { rewrite ^/(.*).jsp$ /$1 redirect; break;
location ~ \.(jsp)$ {
proxy_pass http://192.168.2.225:9595;
if ($request_filename ~* ^(.*).jsp$)
{
rewrite ^/(.*).jsp$ /$1 redirect;
break;
}
}
这将使*.jsp无法访问。如果您希望它们可以访问,但只能通过内部重写,则更改“return 403;”至“内部;”
location ~ \.jsp {
return 403;
}