Hi All,
I've managed to set up ubuntu server and zone minder web interface opens up fine when i go to 192.168.0.16/zm, but how can i make zoneminder be the root of the ip? I want to be able to just type in the ip address and the web interface come up.
I'm sure it's just a change to apache config files but not sure how it's done.
Thanks for any help!
Apache Config
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Apache Config
Find your httpd.conf file and edit DocumentRoot to point to the directory you want.
However, what I have done instead was edit the default index.html in the DocumentRoot folder to auto-redirect to your zoneminder page. It is a very simple amount of html.
That way when users enter www.mywebpage.org, it would auto-redirect to www.mywebpage.org/zm, and if I ever decided to add something else that requires a web server, it would not conflict with zoneminder.
However, what I have done instead was edit the default index.html in the DocumentRoot folder to auto-redirect to your zoneminder page. It is a very simple amount of html.
That way when users enter www.mywebpage.org, it would auto-redirect to www.mywebpage.org/zm, and if I ever decided to add something else that requires a web server, it would not conflict with zoneminder.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 6
- Joined: Sat Aug 10, 2013 2:11 pm
Re: Apache Config
Hi,
Thanks for the reply, but my httpd.conf file is totally empty? There's no DocumentRoot anywhere. I'm looking under /etc/apache2/ but nothing
Thanks
Thanks for the reply, but my httpd.conf file is totally empty? There's no DocumentRoot anywhere. I'm looking under /etc/apache2/ but nothing
Thanks
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Apache Config
Right, Ubuntu. They do things a little differently.
Try this file: /etc/apache2/sites-available/default
If that doesn't work then do this to find where it has been hidden:
Try this file: /etc/apache2/sites-available/default
If that doesn't work then do this to find where it has been hidden:
Code: Select all
cd /etc/apache2
grep -r DocumentRoot ./
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 6
- Joined: Sat Aug 10, 2013 2:11 pm
Re: Apache Config
You were right it was under sites-available>default and doc root is set to >var>xxx.
Now I tried changing this to var>xxx>zm but obviously that didn't work because it is not installed there! I suspect it's something to do with zoneminder.conf which looks like:
I thought I could just change the alias to but that didn't serve anything up (after I restarted apache).
So I'm not sure where it is set?
Thanks
(by the way i've had to switch / to > and www to xxx as the forum think's i'm spamming with URLs)
Now I tried changing this to var>xxx>zm but obviously that didn't work because it is not installed there! I suspect it's something to do with zoneminder.conf which looks like:
Code: Select all
Alias >zm>usr>share>zoneminder
<Directory >usr>share>zoneminder>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
<IfModule>
<Directory>
~
Code: Select all
>usr>share>zoneminder
So I'm not sure where it is set?
Thanks
(by the way i've had to switch / to > and www to xxx as the forum think's i'm spamming with URLs)
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Apache Config
Not sure if Apache will let you Alias the documentroot. I wouldn't be surprised if it didn't.
You should be able to set DocumentRoot=/usr/share/zoneminder
Comment out the entire contents of zonemidner.conf (don't delete it). Forgot about that.
Then restart apache
Check to make sure that www-data has permission to read /usr/share/zoneminder, but that should already be set.
Yet another way would be to leave all your config files alone and:
sudo mv /var/www to /var/www-back
sudo ln -s /usr/share/zoneminder /var/www
Now are you sure you don't want to just edit /var/www/index.html and put an html redirect to {yourwbesite}/zm?
It's by far the least hackish.
You should be able to set DocumentRoot=/usr/share/zoneminder
Comment out the entire contents of zonemidner.conf (don't delete it). Forgot about that.
Then restart apache
Check to make sure that www-data has permission to read /usr/share/zoneminder, but that should already be set.
Yet another way would be to leave all your config files alone and:
sudo mv /var/www to /var/www-back
sudo ln -s /usr/share/zoneminder /var/www
Now are you sure you don't want to just edit /var/www/index.html and put an html redirect to {yourwbesite}/zm?
It's by far the least hackish.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 6
- Joined: Sat Aug 10, 2013 2:11 pm
Re: Apache Config
Yes to be honest it's not actually a big deal for me to type the full address followed by /zm, i've mainly been just trying to learn a bit more about how apache works. it's been a bit of a dark art up until now so thanks for the help.
Now I just need to buy some cameras and work out how to pass them through from Windows server to the ubuntu server through hyper-v! should be interesting!
Now I just need to buy some cameras and work out how to pass them through from Windows server to the ubuntu server through hyper-v! should be interesting!