Skip to content

Reverse Proxy: Apache

oznu edited this page Apr 18, 2019 · 7 revisions

This template can be used when configuring Apache as a reverse proxy for homebridge-config-ui-x:

# virtual host - adjust to suit
<VirtualHost *:80>
        ServerName homebridge.domain.com
        ServerAdmin [email protected]
        DocumentRoot /var/www/html

        <Location />
            ProxyPass http://localhost:8080/
            ProxyPassReverse http://localhost:8080/
            RewriteEngine on
            RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
            RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
            RewriteRule .* ws://localhost:8080%{REQUEST_URI} [P]
        </Location>
</VirtualHost>
# Ensure these modules are loaded somewhere in your httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
Clone this wiki locally