New install -already running apache- linking zm conf?

Forum for questions and support relating to the 1.26.x releases only.
Locked
sdbcable
Posts: 2
Joined: Tue Nov 26, 2013 1:22 am

New install -already running apache- linking zm conf?

Post by sdbcable »

I plan on installing zoneminder on kubuntu 13.10 which I've already installed apache from source. I've configured apache and now know the various ins and outs of the apache config files and settings. The server is currently up and running a .pl out of cgi-bin directory. This was a long walk for a linux newbie but was fun I guess? Is this fun?

The instructions to install zm from a .deb (which would be a nice and easy change :oops: ) state that I need to; "Link Apache by - sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf". In reading that I assume that there is a apache config file called zoneminder.conf that will take over the settings of my server. I don't think I want to do that as I have my config dialed in and content nicely running out of the 'normal' apache locations.

SO here is my quesiton, If I install from a deb package is there a way to define my cgi-bin and webdir? OR can I simply move the zoneminder.pl s to the current directories without "linking apache to zm"? As I haven't seen the scripts (8?) I'm not sure how that would work.

I have a feeling installing from source is really the direction I should go as;
"... ./configure --with-webdir=<your web directory> --with-cgidir=<your cgi directory> where --with-webdir is the directory to which you want to install the PHP files, and --with-cgidir is the directory to which you want to install CGI files. These directories could be /var/www/html/zm and /var/www/cgi-bin for example."

Plus it will be another learning session. If I install from source will I have to install mysql separately and learn that as well? more fun?
fastolfe
Posts: 9
Joined: Sun Oct 27, 2013 4:39 pm

Re: New install -already running apache- linking zm conf?

Post by fastolfe »

The symlink into /etc/apache2/conf.d is the standard Debian/Ubuntu approach to adding new components to your existing Apache installation. It does not replace your running Apache configuration nor should it affect anything on your server unless you have stuff already under a /zm/ path. Take a look at the configuration file and you can see that it's short and self-contained. All it does is specify a /zm/ path on your web server and points it to the zoneminder document root. It does not use cgi-bin and relies instead on the PHP installation (which, using a similar mechanism in /etc/apache2/mods-*, also modified your apache configuration to handle .php files outside of cgi-bin).
sdbcable
Posts: 2
Joined: Tue Nov 26, 2013 1:22 am

Re: New install -already running apache- linking zm conf?

Post by sdbcable »

Thank you for the response. I understand now. I'm trying to read through the apache docs.

Wouldn't an Alias Directive in the apache httpd handle this task?
fastolfe
Posts: 9
Joined: Sun Oct 27, 2013 4:39 pm

Re: New install -already running apache- linking zm conf?

Post by fastolfe »

Yes, you could put all of this in your main httpd.conf, but by keeping it a separate file, the zoneminder package maintainers can easily keep the directives specific to zoneminder isolated and updated independently of your main httpd.conf file. Would you prefer to be making hand edits to merge their changes into your main config every release? The idea is that this doesn't scale well and so the conf.d approach was created to let packages put their own self-contained configs in files managed by the package.
Locked