cnak2
cnak2

Reputation: 1841

NGINX config not working

I am trying to setup a nodejs site using nginx on Digital Ocean, but it doesn't seem to be working. The IP:port is fine and I'm pointing to 127.0.0.1 for localhost. But after restarting ngnix I just get the default.

Here is my config. I'm hoping someone might be able to see what I'm doing wrong here.

server {
    listen 80;
    server_name mydomain.me;

    location / {
        proxy_pass http://0.0.0.0: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;
    }
}

Upvotes: 1

Views: 7614

Answers (1)

Chris
Chris

Reputation: 455

I realize this is an old question but I was just having the same issue and there are no answers yet.

Turned out that my browser had cached the default page so every time I refreshed I was getting the that.

Cleared the browser cache and I got the correct page I was expecting.

Upvotes: 8

Related Questions