I'm trying to set up a reverse proxy so I can access my different servers from outside my nat. My /etc/nginx/sites-available/reverse-proxy.conf looks like
server { listen 80; server_name torrent.website.org access_log /var/log/nginx/torrent_website_com_access.log; error_log /var/log/nginx/pp_website_com_error/log; location / { proxy_pass }
}The dns is pointing at the correct address but it doesn't seem to be forwarding properly. I've tried with open port 80 on UFW and UFW disabled completely. I feel like I'm missing something obviose but I'm not sure what. Any help would be appreciated.
Cheers
1 Answer
Maybe your backend servers are listening to a server name instead of IP. Try this
location / { proxy_set_header HOST $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass }