0
点赞
收藏
分享

微信扫一扫

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;
   }
}




举报

相关推荐

0 条评论