NGINX 报405错误

NGINX不允许向静态文件提交POST方式的请求,否则报405错误(apache中没有出现)  

http://jamesbond0479.blog.163.com/blog/static/24147582012983257691/

 

改为jsp页面提交可解决

 
telnet *.*.*.* 80
POST /map/navigation/2011winter/jsn/jsn_20120723_pack/pvf.jsn
HTTP/1.1
Host:*.*.*.* (2个回车)

HTTP/1.1 405 Not Allowed
Server: MapbarServer
Date: Mon, 08 Oct 2012 05:34:53 GMT
Content-Type: text/html
Content-Length: 173
Connection: keep-alive

<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>MapbarServer</center>
</body>
</html>

经查发现:NGINX不允许向静态文件提交POST方式的请求,否则报405错误
解决办法:
1.在nginx vhosts配置文件中增加如下
error_page 405 =200 @405;
        location @405 {
        root /mapdata/www/datamobile/;
        proxy_method GET;
        proxy_pass http://map_tomcat;
    }

猜你喜欢

转载自goahead2010.iteye.com/blog/2005787