Simple reverse proxy - 520 bad gateway

Jason In North Hollywood nohojason at
Thu Mar 16 02:39:19 UTC 2017

Trying to do a simple proxy from to another server on
the LAN -

This is what my server context looks like: (I modified the default

server {
    listen       80 default_server;
    listen       [::]:80 default_server;
    root         /;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location /link1 {


but visiting a webpage is just loading the nginx 502 bad gateway page.

Error in the log is:

2017/03/15 22:04:27 [crit] 8647#0: *11 connect() to failed
(13: Permission denied) while connecting to upstream, client:, server:, request: "GET /link1/ HTTP/1.1",
upstream: "", host: ""

whats a bit strange looking is the GET /link1/ - as this this should not be
the link in the final upstream URL - it should not be trying to get this

What am I doing wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list