Guacamole: Apache Reverse Proxy – Example

1. Install Apache2:

sudo apt install apache2 -y

2. Enable Apache2 mods:

a2enmod rewrite
a2enmod proxy_http
a2enmod proxy_wstunnel

3. Modify the default virtualhost or create a new one and add:

ProxyPass / http://127.0.0.1:8080/guacamole/ flushpackets=on
ProxyPassReverse / http://127.0.0.1:8080/guacamole/
ProxyPassReverseCookiePath /guacamole /
<Location /websocket-tunnel>
   Order allow,deny
   Allow from all
   ProxyPass ws://127.0.0.1:8080/guacamole/websocket-tunnel
   ProxyPassReverse ws://127.0.0.1:8080/guacamole/websocket-tunnel
</Location>
SetEnvIf Request_URI "^/tunnel" dontlog
CustomLog  /var/log/apache2/guac.log common env=!dontlog

4. Restart Apache

sudo systemctl restart apache2.service



Leave a Comment