1

I have a home web server running on 192.168.1.48, which I can access externally with port (80) forwarding and a domain (let's say mysite.home.com). I also have an IP camera that streams on 192.168.1.215:8081. But I'm unsure how to get the web server to show that stream without port forwarding 8081 and exposing that port.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory "/var/www/html">
        AuthType Basic
        AuthName "Restricted Content"
        AuthUserFile /etc/apache2/.htpasswd
        Require valid-user
    </Directory>
</VirtualHost>

How can I use the IP camera stream as an HTML source without port forwarding?

2
  • Home use is not topical here. Configure a vpn server.
    – user449299
    Jan 14, 2018 at 17:36
  • I assume you mean "HTTP source", not "HTML source". HTTP is the protocol typically found on port 80. HTML is the language used to write web pages in.
    – MSalters
    Jan 15, 2018 at 12:44

3 Answers 3

1

You may try to set up apache2 (virtualhost) as a reverse-proxy.

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

ProxyPass / http://192.168.1.215:8081/
ProxyPassReverse / http://192.168.1.215:8081/

</VirtualHost>

If your apache2 will fail because of no modules installed, install and enable them:

To install under Debian/Ubuntu, use aptitude install libapache2-mod-proxy-html. Then, to enable, a2enmod proxy and a2enmod proxy_http.

0

The question is not really clear. However, as far as I understood, what you would like to do is to expose the stream of the IP camera through the web server right?

Well, if this is the case, then you need to put some intermediate software that will gather the stream from the camera and makes it available on the server as a web page.

Forget to do it only with a configuration of the .htaccess file. Unfortunately you cannot "redirect" internally the http stream from the web server towards the camera as you would like to do.

This package is pretty good for those things ZoneMinder it offers also extended functionalities for home security and so on.

0

If you just wan to be able to access your camera images externally in a secure fashion, then you could try the IP Camera FTP and remote viewing service I'm currently developing. More secure than exposing access to the IP camera for the whole world.

Run the demos or create an account at https://app.comsci.co.uk/camac

Many advantages over a simple FTP server and currently free while in development. If the service proves viable and goes commercial subscription will be priced comparable to the electricty cost of running a recorder 24x7

1
  • 1
    Welcome to Super User! I suggest you read How to not be a spammer if you plan on adding your program elsewhere on this site, so that your posts do not get deleted. Thanks!
    – CalvT
    Jan 15, 2018 at 12:33

You must log in to answer this question.