Question

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

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;
    }


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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