Nginx 405 not allowed解决办法

Nginx 405 not allowed解决办法

       Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。

server {
   listen       80;
   server_name  域名;
   
   location /{
      root /www/文件目录;
      index index.html index.htm index.php;
      error_page 405 =200 http://$host$request_uri;
   }
}   

参考:

http://blog.csdn.net/zy799894671/article/details/38045513

猜你喜欢

转载自crabdave.iteye.com/blog/2358124
今日推荐