Hi,
I want to publish the Zoneminder service in HTTPS mode only:
https://serverip/zm
I was able to do publish in HTTPs through the following statements:
make-ssl-cert generate-default-snakeoil --force-overwrite
a2enmod ssl
a2ensite default-ssl
and then:
service apache2 restart
but, trhough this way, i have the ZM service in http too:
http://serverip/zm
Is there a way to publish the service in https only? please, write down the statements.
thanks
Zoneminder in HTTS only
Zoneminder in HTTS only
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: Zoneminder in HTTS only
No. Zoneminder depends on your web browser settings. Suggest you look up how to remove Apache port 80 server. Or if you are getting to the server through a router just port forward port 443.
Re: Zoneminder in HTTS only
if i cancel port 80 in ports.conf, it works. all traffic on port 80 is blocked and so ZM is visible only in https.
the issue is that i have on the same server a website that works on 80 port. so I cannot close the port 80 (or apply the port forwarding only for 443)...
i need a selective behaviour:
for source in /var/www: to be opened port 80 only
for source /usr/share/zoneminder: to be opened port 443 only
the issue is that i have on the same server a website that works on 80 port. so I cannot close the port 80 (or apply the port forwarding only for 443)...
i need a selective behaviour:
for source in /var/www: to be opened port 80 only
for source /usr/share/zoneminder: to be opened port 443 only
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: Zoneminder in HTTS only
can you try a reverse proxy?
Re: Zoneminder in HTTS only
- Enable apache2 mod_rewrite
Code: Select all
sudo a2enmod rewrite
- Edit your apache2 vhost files in /etc/apache2/sites-enabled/
Code: Select all
sudo nano /etc/apache2/sites-enabled/yourVhostFile.conf
- Add the following lines behind <VirtualHost *:80> and </VirtualHost>
Code: Select all
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
- Restart apache2
Code: Select all
sudo service apache2 restart
Re: Zoneminder in HTTS only
thanks.I will try.
Only a question: i understand the rule you are suggesting is for all the web pages managed on my server (on my server I'm managing a website and ZM).
Is it possible to apply a rule only in case the web address is //serverip/zm or //serverip/zm/...?
thanks
Only a question: i understand the rule you are suggesting is for all the web pages managed on my server (on my server I'm managing a website and ZM).
Is it possible to apply a rule only in case the web address is //serverip/zm or //serverip/zm/...?
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Re: Zoneminder in HTTS only
I think it's possible if you add the lines in
If it's not working you can try to use a dedicated VirtualHost for your ZoneMinder and use ServerName yourZoneMinderHostname
Code: Select all
<Directory /var/www/html/zm> # HERE </Directory>
If it's not working you can try to use a dedicated VirtualHost for your ZoneMinder and use ServerName yourZoneMinderHostname