Apache Reverse Proxy Settings.md 953 B

Apache Reverse Proxy Setting Examples for ArozOS

Apache reverse proxy support can only use with ArozOS v1.119 or later.

Install Apache2

sudo apt-get update
sudo apt-get install apache2 -y

Enable required mods

sudo a2enmod proxy_http
sudo a2enmod proxy_wstunnel
sudo a2enmod rewrite
sudo systemctl restart apache2

Add your proxy target to the config, where 192.168.196.15 is the VLAN address given by zeroTier

sudo nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
		ServerName ixtw.hkwtc.com

        RewriteEngine On
		RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
        RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
        RewriteRule /(.*) ws://192.168.196.15:8080/$1 [P,QSA,L]
        
        ProxyPass / http://192.168.196.15:8080/
        ProxyPassReverse / http://192.168.196.15:8080/
</VirtualHost>

Finally restart apache

sudo systemctl restart apache2