nginx配置nuxt静态文件404
作者:
塔塔七 | 来源:发表于
2021-12-27 15:50 被阅读0次1、错误示例

image.png
2、删掉原来的nginx,修改成如下所示:
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
listen 80; # the port nginx is listening on
server_name your-domain; # setup your domain here
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
location / {
expires $expires;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:3000; # set the address of the Node.js instance here
}
}
本文标题:nginx配置nuxt静态文件404
本文链接:https://www.haomeiwen.com/subject/gauyqrtx.html
网友评论