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

    xiaoxiao2022-07-05  216

    **

    重要的事情说三遍!一定要检查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; } }
    最新回复(0)