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

August 12, 2017 3.4k views
Nginx Ubuntu Apache Docker Deployment

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/ {
    proxy_pass http://<droplet_IP>:8080/guacamole/;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    access_log off;

edited by asb
1 Answer

Hi, guy.
Have you managed to solve this question?

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!