Article 5DT0K Ubuntu server 20.04 with reverse Apache proxy

Ubuntu server 20.04 with reverse Apache proxy

by
alexsec
from LinuxQuestions.org on (#5DT0K)
Dear Linux friends,

I am working on one project. I have forwarded ports 80, 443, 8189, 8188, 8088, 8989 to Apache proxy server from my router. Now reverse proxy needs to forward requests based on domain name to one of two janus video conference servers running on other machines

Here is my sample of config for one server:

<VirtualHost *:80>
ServerName server1.example.com
ServerAlias server1.example.com
ServerAdmin webmaster@example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPreserveHost Off
#LogLevel debug
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule .* "ws://janus.optima-apps.rs:8188/$1" [P,L]

ProxyPass / http://10.x.x.x:80/
ProxyPassReverse / http://10.0.0.35:80/
ProxyPassReverse / http://janus.optima-apps.rs:80/
ProxyPass / ws://10.x.x.x:8188/
ProxyPassReverse / ws://10.x.x.x:8188/
<Location />
Order allow,deny
Allow from all
</Location>

</VirtualHost>

It is not working, Chrome console says unable to connect to 8188 Web socket

Any help would be Greatly Appreciatedlatest?d=yIl2AUoC8zA latest?i=zy4_BFvK-_I:pFelLgvJCg8:F7zBnMy latest?i=zy4_BFvK-_I:pFelLgvJCg8:V_sGLiP latest?d=qj6IDK7rITs latest?i=zy4_BFvK-_I:pFelLgvJCg8:gIN9vFwzy4_BFvK-_I
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments