Page 1 of 1

apache webserver virtual server document root?

Posted: Fri May 29, 2015 12:32 pm
by bencollinz
Bare with me, please. Not an UB guru.

I've used ZM 1.25 on UB 10.04 for the past ~5 years. I did a clean install of 14.04 and ZM 1.28.1.

With ZM 1.25, in webmin, I could change the Document Root to /var/www/zm so I could just type the IP and not have to add the zm to the address.
Where is ZM installed to now, so that I may make the same change? I found that the index.php is located in /usr/share/zoneminder but when I try to set that as the document root it is not accepted.

Thank you in advance!

Ben

Re: apache webserver virtual server document root?

Posted: Fri May 29, 2015 4:05 pm
by BiloxiGeek
On a CentOS based system it looks like you need to point it to /usr/share/zoneminder/www. Could be different for your setup.

Does Ubuntu have mlocate? If it does make sure that it's installed, run "updatedb" and when it's finished run "locate index.php". That should you show where the document root is located.

Re: apache webserver virtual server document root?

Posted: Fri May 29, 2015 7:33 pm
by bencollinz
BiloxiGeek wrote:On a CentOS based system it looks like you need to point it to /. Could be different for your setup.

Does Ubuntu have mlocate? If it does make sure that it's installed, run "updatedb" and when it's finished run "locate index.php". That should you show where the document root is located.
yes, UB has it. I updated it. ran 'locate index.php' and it returned what is in my initial post. (It says my post looks too spammy to paste the path) so, nothing different than I already found.

any other suggestions?

Re: apache webserver virtual server document root?

Posted: Sun Jun 07, 2015 6:12 pm
by bencollinz
anyone else?

Re: apache webserver virtual server document root?

Posted: Thu Jun 25, 2015 10:42 am
by mjbrenegan
You can try this. It should work.

Leave your document root as /var/www/html/ (that is mine in Fedora, but whatever yours is)

Create a symbolic link as such:

ln -s <zoneminder document root>index.php <document root>index.php

where: zoneminder document root is where the pages are for zoneminder (under Fedora, it's /usr/share/zoneminder/www/
document root is the normal webserver document root (under Fedora, it's /var/www/html/)

I actually did that, except that I created a zoneminder subdirectory under the web document root to put the symbolic link in. In my case, it would be <ip address of server>/zoneminder/ that pulls up the console. Without the subdirectory, it would bring up the zm console just by <ip address of server> ;) However, if it's accessable from outside your lan, I would suggest password protecting it at a minimum by using .htaccess and .htpasswd.

Hope that this helps you.

Re: apache webserver virtual server document root?

Posted: Thu Jun 25, 2015 3:25 pm
by theforce
I dont know if this will work but I changed mine to /cameras in the /etc/apache2/conf.d/zoneminder.conf Alias line.

I think if you change the Alias line to just / instead of /zm that will work.

Re: apache webserver virtual server document root?

Posted: Sat Jun 27, 2015 4:35 pm
by bencollinz
theforce wrote:I dont know if this will work but I changed mine to /cameras in the /etc/apache2/conf.d/zoneminder.conf Alias line.

I think if you change the Alias line to just / instead of /zm that will work.
tried this, didn't work. thank you though

Re: apache webserver virtual server document root?

Posted: Wed Jul 01, 2015 5:29 am
by river100
I've built a few with 14.04LTS, ZM vers 1.28.1 and changed in apache2 folder sites-available file 000-default.conf to

DocumentRoot /usr/share/zoneminder

might not be secure but works.
I also use htaccess files and fail2ban.
If there are any security guys out there that think this is not secure, let me know.