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

4. Restart Apache

sudo systemctl restart apache2.service