marcus-g
5/9/2017 - 8:14 PM

Reverse proxy on nginx to a home network with multiple servers to its own subdomain From https://serverfault.com/questions/273679/redirecti

Reverse proxy on nginx to a home network with multiple servers to its own subdomain

From https://serverfault.com/questions/273679/redirecting-to-other-internal-servers-based-on-sub-domain

<VirtualHost *:80>
    ServerName cam1.domain.com

    ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>
    ProxyErrorOverride On                       
    ProxyPass / http://192.168.1.123/
    ProxyPassReverse / http://192.168.1.123/
    <Location />
    Order allow,deny
        Allow from all
    </Location>

</VirtualHost>


<VirtualHost *:80>
    ServerName cam2.domain.com

    ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
    </Proxy>
    ProxyErrorOverride On                       
    ProxyPass / http://192.168.1.124/
    ProxyPassReverse / http://192.168.1.124/
    <Location />
    Order allow,deny
        Allow from all
    </Location>

</VirtualHost>