Can't get nginx as a proxy server working

2

I'm trying to setup my home server to send requests for certain domain names to other computers on my home network (I only have one IP address.) I'm using Nginx to do this, but I'm not having any luck with it.

I have a computer running Nginx that's viewable to the internet. It works fine. I have a raspberry pi running Nginx and it works fine when I'm making requests directly to it.

What I have on the web facing server is this:

server {
    listen 85;

    server_name some.domainname.com;

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

However, when I visit some.domainname.com:85 from outside my home network (or even within my home network pointing to the web server), I just get a network access denied error.

I've tried and read different things, but I'm afraid I'm just stuck now.

chrisjacob

Posted 2015-05-18T02:24:01.170

Reputation: 21

Do you have DNS record for some.domainname.com? – Alexey Ten – 2015-05-19T07:39:39.160

@AlexeyTen yeah, the DNS is pointing to the server. If I add a block on the web facing server to catch requests for my domain, it works fine...but not passing it to the raspberry pi. – chrisjacob – 2015-05-20T14:06:44.487

Have you looked into nginx's error log and access log? – Alexey Ten – 2015-05-20T15:57:17.180

No answers