zoneminder in apache document root

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
gipsea
Posts: 4
Joined: Sun Jul 30, 2017 9:06 pm

zoneminder in apache document root

Post by gipsea »

I'm running ZM 1.32 on a apu2C4 box with installed ubuntu server 18.04 as home system.

to access ZM, rather than:

Code: Select all

http://192.168.1.1/zm
I'd like to reach as:

Code: Select all

http://192.168.1.1
In the 000-default.conf apache default site configuration file I tried to change the

Code: Select all

DocumentRoot /var/www/html
to

Code: Select all

/usr/share/zoneminder/www


but with not great result.

I installed ZM using the repository. I was looking for an option of installing from a .tar file which I could copy directly in the default documentRoot but did not find

Any hint?

Any option to change the default installation directory?

thanks

EDIT:
I updated the 000-default.conf file for the defualt virtual host of apache as follow:

Code: Select all

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port th$
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /usr/share/zoneminder/www

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/zm_error.log
        CustomLog ${APACHE_LOG_DIR}/zm_access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

#
# * From zoneminder.conf / conf-available
#
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>

# Order matters. This alias must come first.
Alias /cache /var/cache/zoneminder/cache
<Directory /var/cache/zoneminder/cache>
    Options -Indexes +FollowSymLinks
    Options -Indexes +FollowSymLinks
    AllowOverride None
    <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>

<Directory /usr/share/zoneminder/www>
  Options -Indexes +FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>

# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.
<Directory "/usr/share/zoneminder/www/api">
   RewriteEngine on
   RewriteRule ^$ app/webroot/ [L]
   RewriteRule (.*) app/webroot/$1 [L]
   RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app/webroot">
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    RewriteBase /zm/api
</Directory>


</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
when I type http://localhost it does open ZM but I've seen that if I go to "Monitor" or any page with the cameras stream it doesn't work

thank you all
Post Reply