mtxr
By:
mtxr

[Problem] How to setup NGINX docker container as a reverse proxy to an Apache Guacamole docker container?

August 12, 2017 533 views
Nginx Apache Docker Deployment Ubuntu

I have a droplet with docker installed on it. I have a working setup of Apache Guacamole using 3 separate containers (guacamole, guacd, mysql) running on port 8080 and can access the guacamole login page via http://<droplet_ip>:8080/guacamole/

In another container I have NGINX running and I am trying to forward requests from http://<droplet_ip>/guacamole/ to my guacamole container that is running on port 8080

When i visit http://<droplet_ip>/guacamole/ i get an error page from NGINX that there was an error in the request or a 404 not found page. For some reason NGINX is unable to forward the requests

Can someone help me get the requests forward to the guacamole container?

Below is my NGINX default.conf file:

server {
listen 80;

location /guacamole/ {
proxypass http://<dropletIP>:8080/guacamole/;
proxybuffering off;
proxy
httpversion 1.1;
proxy
setheader X-Forwarded-For $proxyaddxforwardedfor;
proxy
setheader Upgrade $httpupgrade;
proxysetheader Connection $httpconnection;
access
log off;
}

Be the first one to answer this question.