Sample Apache2 vhost config

Forum for questions and support relating to the 1.24.x releases only.
Locked
jmomo
Posts: 2
Joined: Mon Jul 26, 2010 2:51 am

Sample Apache2 vhost config

Post by jmomo »

Below is a sample Apache2 vhost config that works for me, in case you want a vhost service. In such case, your website would be at http://zoneminder.mydomain.com. Makes it easy to move the service from one host to another in the future. Just add a CNAME in DNS.

OS here is Debian GNU/Linux unstable.

--

Code: Select all

VirtualHost *>
        ServerName zoneminder.mydomain.com
        ServerAlias zoneminder *.zoneminder.mydomain.com
        ServerAdmin webmaster@mydomain.com
        DocumentRoot /usr/share/zoneminder
        Options +FollowSymLinks Indexes
        <Location>
                Order allow,deny
                Allow from 127.0.0.1 192.168.15.0/24
                Options +FollowSymLinks Indexes
        </Location>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

        <IfModule>
                AddType application/x-httpd-php .php
                php_flag register_globals Off
                DirectoryIndex index.php
        </IfModule>
</VirtualHost>
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

Thank you; for that zm does come with a config but you may want to post this alternative in the wiki so someone can find it easier.
Locked