apache webserver virtual server document root?

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
bencollinz
Posts: 24
Joined: Fri May 29, 2015 12:23 pm

apache webserver virtual server document root?

Post by bencollinz » Fri May 29, 2015 12:32 pm

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

BiloxiGeek
Posts: 240
Joined: Tue Feb 11, 2014 2:04 pm

Re: apache webserver virtual server document root?

Post by BiloxiGeek » Fri May 29, 2015 4:05 pm

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.

bencollinz
Posts: 24
Joined: Fri May 29, 2015 12:23 pm

Re: apache webserver virtual server document root?

Post by bencollinz » Fri May 29, 2015 7:33 pm

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?

bencollinz
Posts: 24
Joined: Fri May 29, 2015 12:23 pm

Re: apache webserver virtual server document root?

Post by bencollinz » Sun Jun 07, 2015 6:12 pm

anyone else?

mjbrenegan
Posts: 7
Joined: Mon Jun 08, 2015 10:39 am

Re: apache webserver virtual server document root?

Post by mjbrenegan » Thu Jun 25, 2015 10:42 am

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.

theforce
Posts: 126
Joined: Tue May 11, 2010 5:22 am

Re: apache webserver virtual server document root?

Post by theforce » Thu Jun 25, 2015 3:25 pm

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.

bencollinz
Posts: 24
Joined: Fri May 29, 2015 12:23 pm

Re: apache webserver virtual server document root?

Post by bencollinz » Sat Jun 27, 2015 4:35 pm

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

river100
Posts: 141
Joined: Sun Oct 07, 2007 5:52 pm
Location: Louisiana

Re: apache webserver virtual server document root?

Post by river100 » Wed Jul 01, 2015 5:29 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests