Answer the question
In order to leave comments, you need to log in
How to properly deploy nuxt application on linux server?
There is an application on Nuxt. On my local computer, it opens successfully and all resources are shown
The application is deployed here:
glinka.tk
When I deployed to a linux server, the application is displayed, but no resources were found, and an error appears:
What did I do wrong when deploying? and how to fix it?
All resources are loaded from this folder:
I connect images like this:
<img src="../assets/images/my-works-bg.webp" alt="works-bg" />
<img src="~/assets/images/avatar.webp" alt="" />
server {
listen 80;
server_name glinka.tk www.glinka.tk;
index index.html index.htm;
location /_nuxt/ {
alias /home/kentforth/webapps/Glinka-Frontend-Nuxt/.nuxt/dist/;
}
location / {
proxy_pass http://localhost:6050;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
error_log /var/log/nginx/glinka-frontend-error.log;
access_log /var/log/nginx/glinka-frontend-access.log;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question