Report this

What is the reason for this report?

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

Posted on August 12, 2017
mtxr

By mtxr

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



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.