2011-04-28 22:10:40 +08:00
|
|
|
#
|
|
|
|
# PLEASE NOTE THAT THIS FILE IS INTENDED FOR GUIDANCE ONLY AND MAY NOT BE APPROPRIATE FOR YOUR DISTRIBUTION
|
|
|
|
#
|
2011-05-16 05:16:36 +08:00
|
|
|
# Sample configuration file for running ZoneMinder as name based virtual host
|
|
|
|
# Some values may need to manually adjusted to suit your setup
|
2011-04-27 22:32:41 +08:00
|
|
|
#
|
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerAdmin webmaster@localhost
|
|
|
|
|
2011-05-16 05:16:36 +08:00
|
|
|
DocumentRoot "@WEB_PREFIX@"
|
2018-04-20 03:01:46 +08:00
|
|
|
|
|
|
|
# Order matters. This alias must come first.
|
|
|
|
Alias /zm/cache "@ZM_CACHEDIR@"
|
|
|
|
<Directory "@ZM_CACHEDIR@">
|
|
|
|
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>
|
|
|
|
|
2018-01-18 00:38:20 +08:00
|
|
|
Alias /zm "@WEB_PREFIX@"
|
2011-05-16 05:16:36 +08:00
|
|
|
<Directory "@WEB_PREFIX@">
|
2016-11-08 22:30:24 +08:00
|
|
|
Options -Indexes +FollowSymLinks
|
2011-04-27 22:32:41 +08:00
|
|
|
AllowOverride All
|
2017-04-03 10:42:48 +08:00
|
|
|
<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>
|
2011-04-27 22:32:41 +08:00
|
|
|
</Directory>
|
|
|
|
|
2015-05-24 21:50:04 +08:00
|
|
|
ScriptAlias /cgi-bin "@CGI_PREFIX@"
|
2011-05-16 05:16:36 +08:00
|
|
|
<Directory "@CGI_PREFIX@">
|
|
|
|
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
2011-04-27 22:32:41 +08:00
|
|
|
AllowOverride All
|
2015-08-22 21:56:47 +08:00
|
|
|
<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>
|
2011-04-27 22:32:41 +08:00
|
|
|
</Directory>
|
|
|
|
|
2018-04-20 03:01:46 +08:00
|
|
|
# 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 "@ZM_WEBDIR@/api">
|
|
|
|
RewriteEngine on
|
|
|
|
RewriteRule ^$ app/webroot/ [L]
|
|
|
|
RewriteRule (.*) app/webroot/$1 [L]
|
|
|
|
RewriteBase /zm/api
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
<Directory "@ZM_WEBDIR@/api/app">
|
|
|
|
RewriteEngine on
|
|
|
|
RewriteRule ^$ webroot/ [L]
|
|
|
|
RewriteRule (.*) webroot/$1 [L]
|
|
|
|
RewriteBase /zm/api
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
<Directory "@ZM_WEBDIR@/api/app/webroot">
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^ index.php [L]
|
|
|
|
RewriteBase /zm/api
|
|
|
|
</Directory>
|
|
|
|
|
2011-04-27 22:32:41 +08:00
|
|
|
# Use the first option to have Apache logs written to the general log
|
|
|
|
# directory, or the second to have them written to the regular Apache
|
|
|
|
# directory (you may have to change the path to that used on your system)
|
|
|
|
ErrorLog @ZM_LOGDIR@/apache-error.log
|
2015-05-24 21:50:04 +08:00
|
|
|
#ErrorLog /var/log/httpd/zm-error.log
|
2011-04-27 22:32:41 +08:00
|
|
|
|
|
|
|
# Possible values include: debug, info, notice, warn, error, crit,
|
|
|
|
# alert, emerg.
|
|
|
|
LogLevel warn
|
|
|
|
|
|
|
|
# Use the first option to have Apache logs written to the general log
|
|
|
|
# directory, or the second to have them written to the regular Apache
|
|
|
|
# directory (you may have to change the path to that used on your system)
|
|
|
|
CustomLog @ZM_LOGDIR@/apache-access.log combined
|
2015-05-24 21:50:04 +08:00
|
|
|
#CustomLog /var/log/httpd/zm-access.log combined
|
2011-04-27 22:32:41 +08:00
|
|
|
|
|
|
|
</VirtualHost>
|