virtualhost configuration and API access
Posted: Tue Jul 23, 2019 12:47 pm
Hi! I have installed ZM 1.32.3 on debian stable, via apt. I have set up a virtualhost for my apache that looks like
<VirtualHost 192.168.0.2:443>
ServerAdmin admin@mydomain.org
ServerName zm.mydomain.org
DocumentRoot /usr/share/zoneminder/www
CustomLog ${APACHE_LOG_DIR}/zm.log vhost_ssl
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
# Require all granted
</Directory>
</VirtualHost>
The web interface can be accessed properly, configured and so... however, when I try going zm.mydomain.org/api/host/getVersion.json I get a 404 error... and zmNinja can not access the API neither. For what is worth, I see that no .htaccess files are in any place on the tree. Does anybody know how to fix this situation?
Thank you.
<VirtualHost 192.168.0.2:443>
ServerAdmin admin@mydomain.org
ServerName zm.mydomain.org
DocumentRoot /usr/share/zoneminder/www
CustomLog ${APACHE_LOG_DIR}/zm.log vhost_ssl
ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options -Indexes +FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
# Require all granted
</Directory>
</VirtualHost>
The web interface can be accessed properly, configured and so... however, when I try going zm.mydomain.org/api/host/getVersion.json I get a 404 error... and zmNinja can not access the API neither. For what is worth, I see that no .htaccess files are in any place on the tree. Does anybody know how to fix this situation?
Thank you.