Basket
Your basket is empty.
Posted on Tuesday 25 July 2017 by Laposa UK
$ apt install motion
$ vi /etc/motion/motion.conf
Find the following lines and make the following changes.
$ vi /etc/default/motion
Make the following change:
Next we need to make sure the motion capture directory is writable
$ chmod 777 /var/lib/motion
Now make sure the camera is connected and start the service with the command:
$ service motion start
To stop the service, the command is:
$ service motion stop
Now you can view the camera from a browser on the Pi (or other computer if stream_localhost was set to off) by connecting to your Pi’s IP address and Motion’s default port 8081
http://localhost:8081
$ crontab -e
@reboot /usr/local/bin/open_tunel &
$ vi /usr/local/bin/open_tunel
#!/bin/sh -e
autossh -M 0 -f -T -N mywebserver.example.org -g -R 0.0.0.0:8081:localhost:8081
vi /etc/apache2/sites-available/mywebserver.example.org-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mywebserver.example.org
VirtualDocumentRoot /srv/mywebserver.example.org/public_html
SSLCertificateFile /etc/letsencrypt/live/mywebserver.example.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mywebserver.example.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ProxyPass /motion http://localhost:8081
ProxyPassReverse /motion http://localhost:8081
ProxyPass /motion.jpeg http://localhost:8081
ProxyPassReverse /motion.jpeg http://localhost:8081
</VirtualHost>
</IfModule>
© 2024 Laposa UK