Page 1 of 1

AH01630: client denied by server configuration: /var/www/localhost/cgi-bin,

Posted: Thu Jan 10, 2019 12:20 am
by undrwater
Getting apache errors as above. Problem is; the cgi-bin is not in:

Code: Select all

I cannot find a config file where the above is listed; including apache.conf, 10_zoneminder.conf (in vhosts), or /etc/zm.conf.

I'm running Gentoo and I don't have an /etc/zm/ directory.

I'm sure it's an easy solution, but I can't find where to point apache to /usr/share/zoneminder/www

Re: AH01630: client denied by server configuration: /var/www/localhost/cgi-bin,

Posted: Thu Jan 10, 2019 3:41 pm
by rockedge
the /cgi-bin will not be located in the web root of zoneminder. I am unfamiliar with the Gentoo set up but I will look at it and maybe I can give you a pointer. you must find the location of the the /cgi-bin/nph-zms and /cgi-bin/zms. Then find out where the configuration files are for zoneminder. this is a start to be able to get this going for you.

Re: AH01630: client denied by server configuration: /var/www/localhost/cgi-bin,

Posted: Thu Jan 10, 2019 10:01 pm
by undrwater
Thanks for the reply!

Both are in:

Code: Select all

Here's 10_zoneminder.conf. Maybe there's something wrong in there?

Code: Select all

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

ScriptAlias /zm/cgi-bin/ "/usr/libexec/zoneminder/cgi-bin/"

<Directory "/usr/libexec/zoneminder/cgi-bin">
  AllowOverride All
  Options +ExecCGI
  Require all granted

Alias /zm "/usr/share/zoneminder/www"

<Directory "/usr/share/zoneminder/www">
  Options -Indexes +MultiViews +FollowSymLinks
  AllowOverride All
  Require all granted

<Directory "/usr/share/zoneminder/www/api">
       RewriteEngine on
       RewriteRule ^$ app/webroot/ [L]
       RewriteRule (.*) app/webroot/$1 [L]
       RewriteBase /zm/api

    <Directory "/usr/share/zoneminder/www/api/app">
       RewriteEngine on
       RewriteRule ^$ webroot/ [L]
       RewriteRule (.*) webroot/$1 [L]
       RewriteBase /zm/api

    <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
And /etc/zm.conf (you'll note I added the ZM_PATH_ZMS in there):

Code: Select all

# Path to installed data directory, used mostly for finding DB upgrade scripts

# Path to ZoneMinder binaries

# Path to ZoneMinder libraries (none at present, for future use)

# Path to ZoneMinder configuration (this file only at present)

# Path to ZoneMinder web files

# Path to ZoneMinder cgi files

# /cgi-bin path 

# Username and group that web daemon (httpd/apache) runs as

# ZoneMinder database type: so far only mysql is supported

# ZoneMinder database hostname or ip address and optionally port or unix socket
# Acceptable formats include hostname[:port], ip_address[:port], or localhost:unix_socket

# ZoneMinder database name

# ZoneMinder database user

# ZoneMinder database password

# SSL CA certificate for ZoneMinder database

# SSL client key for ZoneMinder database

# SSL client cert for ZoneMinder database

# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
# You have been warned
# The name specified here must have a corresponding entry
# in the Servers tab under Options

Re: AH01630: client denied by server configuration: /var/www/localhost/cgi-bin,

Posted: Thu Jan 10, 2019 11:57 pm
by rockedge
Good start!
the config files looks okay...check to make sure that cgi is enabled in Apache and that the zoneminder.conf is also enabled and has a symlink in /etc/apache2/conf-enabled
make sure all the directories for zoneminder and files like /etc/zm.conf have the correct ownership that match the Apache user name and permissions.

Re: AH01630: client denied by server configuration: /var/www/localhost/cgi-bin,

Posted: Fri Jan 11, 2019 8:43 pm
by undrwater
OK...need to step back a bit...
the reason for looking into that error was because the cameras were not displaying on the console or montage, and the page would refresh furiously. I assumed (I know, I know...) that resolving the error would resolve the problems with camera and refresh, but it didn't.

Now the errors have stopped (which is good), but I still can't see the cameras, and the page refreshes. I CAN see the cameras on zmninja though, so api is working.