#vue项目打包上传到nginx,请求错误
出现nginx 405 Not Allowed错误的解决方法
往nginx.conf文件添加
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;
}
结果还是出错,报错代码:
We‘re sorry but doesn‘t work properly without JavaScript enabled.
Please enable it to continue.
使用了这个链接中的方法,发现不行
解决报错 We‘re sorry but doesn‘t work properly without JavaScript enabled. Please enable it to continue.
第二个方法(可行)
We’re sorry but XXX doesn’t work properly without JavaScript enabled(解决方案汇总)
终于解决了TAT