出现nginx 405 Not Allowed错误的解决方法

28次阅读
没有评论
1
nano nginx.conf

添加以下内容:

1
2
3
4
5
6
7
8
9
10
11
12
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 404 /404.html;
error_page 403 /403.html;
# To allow POST on static pages 允许静态页使用 POST 方法
error_page 405 =200 $uri;
}
正文完
 0
liveob
版权声明:本站原创文章,由 liveob 于2024-09-14发表,共计226字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码