404 in response to event filter links - where is zm.php?
Posted: Tue Nov 15, 2022 6:14 pm
Have installed ZoneMinder 1.36.31 on a fresh VM with Ubuntu 22.04 from the repo. I essentially followed this doc, and also looked at the wiki. hostname of the VM is "zoneminder", i.e. the VM is zoneminder.example.com. Following the default installation, Zoneminder is available on http://zoneminder.example.com/vm/.
I have created a filter to act on certain alarms. I am passing some arguments to the script called by the filter, e.g. %EP%, %EPI%, %EPI1%, %EPS%.
1st problem: The links created for these tokens follow the scheme http://zoneminder.example.com/zm.php?... - i.e. the /zm/ is missing. Did I miss a required configuration in ZoneMinder somewhere?
2nd problem: Even with /zm/ added manually, the links are not working. Apache's error log:
And indeed, I cannot find a zm.php anywhere in the VM...
The apache config is the one from the repo:
I have created a filter to act on certain alarms. I am passing some arguments to the script called by the filter, e.g. %EP%, %EPI%, %EPI1%, %EPS%.
1st problem: The links created for these tokens follow the scheme http://zoneminder.example.com/zm.php?... - i.e. the /zm/ is missing. Did I miss a required configuration in ZoneMinder somewhere?
Code: Select all
[Tue Nov 15 18:37:55.511807 2022] [php:error] [pid 4466] [client 192.168.6.151:53925] script '/var/www/html/zm.php' not found or unable to stat
Code: Select all
[Tue Nov 15 19:03:03.998456 2022] [php:error] [pid 8898] [client 192.168.6.151:54381] script '/usr/share/zoneminder/www/zm.php' not found or unable to stat
The apache config is the one from the repo:
Code: Select all
# cat /etc/apache2/conf-available/zoneminder.conf
# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/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 /zm/cache /var/cache/zoneminder/cache
<Directory /var/cache/zoneminder/cache>
Options -Indexes +FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
</Directory>
Alias /zm /usr/share/zoneminder/www
<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">
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) 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>