Ver Fonte

Added doc for apache reverse proxy arozos

Toby Chui há 3 anos atrás
pai
commit
e579c1eeea
1 ficheiros alterados com 47 adições e 0 exclusões
  1. 47 0
      documents/Apache Reverse Proxy Settings.md

+ 47 - 0
documents/Apache Reverse Proxy Settings.md

@@ -0,0 +1,47 @@
+# Apache Reverse Proxy Setting Examples for ArozOS
+
+**Apache reverse proxy support can only use with ArozOS v1.119  or later.**
+
+Install Apache2
+
+```z
+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
+```
+