From 1822510909816bcee548c68cddac8b9e5c7f1fe3 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Fri, 14 Jul 2017 10:15:12 -0500 Subject: [PATCH] rpm packaging - consolidate zoneminder apache config file --- distros/redhat/CMakeLists.txt | 10 +-- .../{systemd => apache}/zoneminder.conf.in | 0 distros/redhat/sysvinit/zoneminder.conf.in | 71 ------------------- 3 files changed, 5 insertions(+), 76 deletions(-) rename distros/redhat/{systemd => apache}/zoneminder.conf.in (100%) delete mode 100644 distros/redhat/sysvinit/zoneminder.conf.in diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 63159b1c7..7684fb975 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -9,15 +9,15 @@ else(ZM_TARGET_DISTRO MATCHES "^el") message([WARNING] "Unknown Build Option Detected" ...) endif(ZM_TARGET_DISTRO MATCHES "^el") -if((ZM_TARGET_DISTRO STREQUAL "el6") AND (ZM_WEB_USER STREQUAL "nginx")) - message([FATAL_ERROR] "Nginx is Not a Supported Build Option on EL6 Target Distro" ...) -endif((ZM_TARGET_DISTRO STREQUAL "el6") AND (ZM_WEB_USER STREQUAL "nginx")) +if((NOT ZM_TARGET_DISTRO MATCHES "^fc") AND (ZM_WEB_USER STREQUAL "nginx")) + message([FATAL_ERROR] "Experimental Nginx support is currently only supported on Fedora" ...) +endif((NOT ZM_TARGET_DISTRO MATCHES "^fc") AND (ZM_WEB_USER STREQUAL "nginx")) # Configure the zoneminder service files if(ZM_TARGET_DISTRO STREQUAL "el6") configure_file(sysvinit/zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.sysvinit @ONLY) configure_file(sysvinit/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY) - configure_file(sysvinit/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) + configure_file(apache/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) else(ZM_TARGET_DISTRO STREQUAL "el6") configure_file(systemd/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY) if(ZM_WEB_USER STREQUAL "nginx") @@ -28,7 +28,7 @@ else(ZM_TARGET_DISTRO STREQUAL "el6") configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/readme/README.Fedora COPYONLY) else(ZM_WEB_USER STREQUAL "nginx") configure_file(systemd/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) - configure_file(systemd/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) + configure_file(apache/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) configure_file(systemd/zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) endif(ZM_WEB_USER STREQUAL "nginx") endif(ZM_TARGET_DISTRO STREQUAL "el6") diff --git a/distros/redhat/systemd/zoneminder.conf.in b/distros/redhat/apache/zoneminder.conf.in similarity index 100% rename from distros/redhat/systemd/zoneminder.conf.in rename to distros/redhat/apache/zoneminder.conf.in diff --git a/distros/redhat/sysvinit/zoneminder.conf.in b/distros/redhat/sysvinit/zoneminder.conf.in deleted file mode 100644 index 0e546f9df..000000000 --- a/distros/redhat/sysvinit/zoneminder.conf.in +++ /dev/null @@ -1,71 +0,0 @@ -# -# 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] - -Alias /zm "@ZM_WEBDIR@" - - # explicitly set index.php as the only directoryindex - DirectoryIndex disabled - DirectoryIndex index.php - SSLRequireSSL - Options -Indexes +MultiViews +FollowSymLinks - AllowOverride None - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - - -ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@" - - SSLRequireSSL - AllowOverride None - Options +ExecCGI +FollowSymLinks - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - - -# 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. - - RewriteEngine on - RewriteRule ^$ app/webroot/ [L] - RewriteRule (.*) app/webroot/$1 [L] - RewriteBase /zm/api - - - - RewriteEngine on - RewriteRule ^$ webroot/ [L] - RewriteRule (.*) webroot/$1 [L] - RewriteBase /zm/api - - - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - RewriteBase /zm/api - -