Do you mean how to configure nginx as proxy?
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
listen 80;
server_name your-domain;
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;
}
}
Thank you
@Atinux @alexchopin this could be something for the FAQ (deployment section)
@vuchl could you open a PR for it on nuxt/docs? :)
@awronski
````
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|js|pdf|txt){
root /www/xxxx/production/current/_nuxt;
}
````
when i config in nginx i got 404 error
how i resolve this prob
@naihe138
how do you use nuxt?
Is is:
i don,t know whether this is too late but i was also struggling to deploy my nuxt app using nginx and pm2...but this tutorial finally helped me Deploying nuxt with nginx and pm2
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Do you mean how to configure nginx as proxy?