Deploy nuxt application on a nginx VPS server running ubuntu


I am trying to deploy a nuxt blog to a virtual private server that runs nginx.
The blog is supposed to be accessible when I browse to

I have managed to run npm run dev on the server successifully… The app is running on localhost:3000 on the server….

I need to set a reverse proxy on the server to redirect all requests from to localhost:3000

I have tried this twice and its failing…. When I browse the app is loading forever…. when I go to it says "Page not working", or "Internal server error"

Kindly assist


This could be happening due to incorrect configuration.

sudo nano /etc/nginx/sites-available/

Remember to change the to your desire domain

server {
    listen 80;
    listen [::]:80;
    index index.html;

    location / {
        proxy_pass http://localhost:3000;
        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;

Answered By – zernonia

Answer Checked By – Terry (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.