2013-09-16 05:33:09 +08:00
|
|
|
#
|
2015-09-08 04:50:42 +08:00
|
|
|
# ZoneMinder Apache configuration file
|
|
|
|
# With SSLRequire and HTTPS auto redirect
|
|
|
|
# Modify this configuration to suit your requirements
|
|
|
|
#
|
|
|
|
|
|
|
|
# Auto Redirect HTTP requests to HTTPS
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{HTTPS} !=on
|
|
|
|
RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L]
|
2013-09-16 05:33:09 +08:00
|
|
|
|
2018-04-20 03:01:46 +08:00
|
|
|
# Order matters. This alias must come first.
|
|
|
|
Alias /zm/cache "@ZM_CACHEDIR@"
|
|
|
|
<Directory "@ZM_CACHEDIR@">
|
|
|
|
SSLRequireSSL
|
|
|
|
Options -Indexes +MultiViews +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>
|
|
|
|
|
2015-02-15 19:39:27 +08:00
|
|
|
Alias /zm "@ZM_WEBDIR@"
|
|
|
|
<Directory "@ZM_WEBDIR@">
|
2017-01-05 00:45:36 +08:00
|
|
|
# explicitly set index.php as the only directoryindex
|
|
|
|
DirectoryIndex disabled
|
|
|
|
DirectoryIndex index.php
|
2015-09-08 04:50:42 +08:00
|
|
|
SSLRequireSSL
|
2015-02-09 07:56:44 +08:00
|
|
|
Options -Indexes +MultiViews +FollowSymLinks
|
2017-07-14 20:23:35 +08:00
|
|
|
AllowOverride None
|
2015-02-09 07:56:44 +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>
|
2013-09-16 05:33:09 +08:00
|
|
|
</Directory>
|
|
|
|
|
2015-02-15 19:39:27 +08:00
|
|
|
ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@"
|
|
|
|
<Directory "@ZM_CGIDIR@">
|
2015-09-08 04:50:42 +08:00
|
|
|
SSLRequireSSL
|
2017-07-14 20:23:35 +08:00
|
|
|
AllowOverride None
|
2015-08-14 09:23:52 +08:00
|
|
|
Options +ExecCGI +FollowSymLinks
|
2015-02-09 07:56:44 +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>
|
2013-09-16 05:33:09 +08:00
|
|
|
</Directory>
|
2015-09-08 04:50:42 +08:00
|
|
|
|
2017-07-14 20:23:35 +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>
|
|
|
|
|