upstream hostname.net { server 127.0.0.1:8080;} server { listen 0.0.0.0:80; server_name hostname.net; access_log /var/log/nginx/hostname.access.log; error_log /var/log/nginx/hostname.error.log debug; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarder-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://hostname.net; proxy_redirect off; } }