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


405 Not Allowed

405 Not Allowed



MapbarServer




经查发现: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;
    }

你可能感兴趣的:(nginx)