POST方式请求静态资源时nginx提示405 NotAllow错误解决方法详解程序员

**

重要的事情说三遍!一定要检查nginx.conf文件中http定义域是否有proxy_intercept_errors on;fastcgi_intercept_errors on;


重要的事情说三遍!一定要检查nginx.conf文件中http定义域是否有proxy_intercept_errors on;fastcgi_intercept_errors on;


重要的事情说三遍!一定要检查nginx.conf文件中http定义域是否有proxy_intercept_errors on;fastcgi_intercept_errors on;

**
然后正常设置error_page,本人的配置如下所示,仅供参考:

http { 
    proxy_intercept_errors on; 
    fastcgi_intercept_errors on; 
    server { 
            listen       80; 
            server_name  localhost; 
     
            location / { 
                root   html; 
                index  index.html index.htm; 
            } 
            error_page  405     =200 $uri; 
    } 
} 

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/1719.html

(0)
上一篇 2021年7月15日 23:16
下一篇 2021年7月15日 23:16

相关推荐

发表回复

登录后才能评论