Apache HTTP Server can be configured in both a forward and reverse proxy (also known as gateway) mode. An ordinary forward proxy is an intermediate server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server as the target and the proxy then requests the content from the origin server and returns it to the client. The client must be specially configured to use the forward proxy to access other sites. Reverse Proxy example:
ProxyPass "/foo" "http://foo.example.com/bar"
ProxyPassReverse "/foo" "http://foo.example.com/bar"
ProxyPass /camera http://127.0.0.1:10000
ProxyPassReverse /camera http://127.0.0.1:10000
Motion and reverse proxy mode. For this example I have assigned port 10000 for an internet camera.
root~# cat /etc/apache2/virtual/camera-ssl.domain.com
--cut
<Location /camera>
AuthType Basic
AuthUserFile /etc/apache2/motion.htpasswd
AuthName "Protected Motion"
Require valid-user
</Location>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /camera http://127.0.0.1:10000
ProxyPassReverse /camera http://127.0.0.1:10000
--cut