httpd:reverse_porxy

Reverse Proxy

One of the usage of reverse proxy is to add TSL(https) to internal site that does not have such feature, such as your cheap ip camera.

The following example listen to port 27960, and redirect to an internal ip 192.168.10.100 with port 80. Since we are doing a https here, we need to set up the SSLengine as well.

Listen 27960
<VirtualHost *:27960>
   ProxyRequests Off
   ProxyPreserveHost On
   ProxyVia On
   <Proxy *>
      Order deny,allow
      Allow from all
   </Proxy>
   ProxyPass / http://192.168.10.100:80/
   ProxyPassReverse / http://192.168.10.100:80/
   CustomLog /dev/null combined
   ErrorLog /dev/null
   ServerName cam1

   SSLengine On
   SSLCertificateFile      "/somewhere/server.crt"
   SSLCertificateKeyFile   "/somewhere/server.key"

   <FilesMatch "\.(cgi|shtml|phtml|php)$">
      SSLOptions +StdEnvVars
   </FilesMatch>

   <Directory /usr/lib/cgi-bin>
      SSLOptions +StdEnvVars
   </Directory>
</VirtualHost>
  • httpd/reverse_porxy.txt
  • Last modified: 2019/12/20 11:35
  • by chongtin