Guacamole Behind Nginx Proxy Manager

Anyone who has used nginx may agree that nginx proxy manager just adds a nice ui and makes things like refreshing configs easier. I wanted to migrate to it becuase I could use a docker container and it wasnt needed any longer on the host machine. I had an existing domain that wanted to utilise so I needed to add an extra path which would take me to nginx proxy manager.

Here is how I did it:

Once your site is set up in nginx proxy manager, you need to go into the advanced tab and enter this (change settings relevant to your requirements)

location /thepathyouwanttouse/ {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass https://theserveryouwanttorouteto:theportyouwanttorouteto/;  
    proxy_read_timeout     300;
    proxy_connect_timeout  300;
    proxy_buffering off;
    # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    # Remove the Connection header if the client sends it,
    # it could be "close" to close a keepalive connection
    proxy_set_header Connection "";     
}

Hopefully this config works for you! Drop any comments below!


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *