1.nginx配置文件修改
error_page 405 =200 @405;
location @405 {
root /www/app;
}
2.重新编译
编辑nginx源代码
[root@new-host ~]# vim src/http/modules/ngx_http_static_module.c
修改: 找到下面一段注释掉
/*if (r->method & NGX_HTTP_POST) {
return NGX_HTTP_NOT_ALLOWED;
}*/
然后按照原来的编译参数,重新编译安装nginx,即可