proxypass – Redirect domain.com/path to another Apache Server – Stack Overflow

he setup:

Server A) Apache server that only serves proxypass and doesn’t host anything

Server B) Apache server that hosts main domain.com

Server C) Apache server that hosts ZoneMinder @ domain.com/zm

Server A Config:

<VirtualHost *:80>
ServerName domain.com
Redirect / https://www.domain.com/
</VirtualHost>

<VirtualHost *:443>
ServerName www.domain.com
ProxyRequests Off
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
SSLEngine on
SSLCertificateFile /location of .crt
SSLCertificateKeyFile /location of .key
SSLCACertificateFile /location of .crt
ProxyPreserveHost on

ProxyPass /zm https://192.168.1.43:443/zm
ProxyPassReverse /zm https://192.168.1.43:443/zm


ProxyPass / https://192.168.1.42:443/
ProxyPassReverse / https://192.168.1.42:443/

<Location />
    Order allow,deny
    Allow from all
</Location>
</VirtualHost>

Notes: It is important to have the /zm come before the “/” catch all. I also noticed it FAILED if i used /zm/.

 

Source: proxypass – Redirect domain.com/path to another Apache Server – Stack Overflow

proxypass – Redirect domain.com/path to another Apache Server – Stack Overflow was last modified: July 21st, 2021 by Jovan Stosic

Leave a Reply