--- rpms/smeserver-zoneminder/contribs10/smeserver-zoneminder-1.0-bz12069-24syntax.patch 2022/08/01 04:32:52 1.1 +++ rpms/smeserver-zoneminder/contribs10/smeserver-zoneminder-1.0-bz12069-24syntax.patch 2022/08/01 05:26:29 1.2 @@ -1,21 +1,91 @@ -diff -urN smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder ---- smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder 2022-07-22 13:16:11.659203129 +0300 -+++ smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder 2022-07-22 13:28:35.253426318 +0300 -@@ -7,8 +7,7 @@ +diff -Nur --no-dereference smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder +--- smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder 2022-08-01 00:26:08.196000000 -0400 ++++ smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86zoneminder 2022-08-01 01:24:16.409000000 -0400 +@@ -1,14 +1,28 @@ ++# ++# ZoneMinder Apache configuration file ++# With SSLRequire and HTTPS auto redirect ++# Modify this configuration to suit your requirements ++# ++ ++ ++ SSLRequireSSL ++ Options -Indexes +MultiViews +FollowSymLinks ++ AllowOverride None ++ Require all granted ++ ++ + +-Alias /zm "/usr/share/zoneminder/www" + +- Options -Indexes -MultiViews -FollowSymLinks ++ # explicitly set index.php as the only directoryindex ++ DirectoryIndex disabled ++ DirectoryIndex index.php ++ SSLRequireSSL ++ Options -Indexes +MultiViews +FollowSymLinks + #AddType application/x-httpd-php .php + SetHandler "proxy:unix:/var/run/php-fpm/php74.sock|fcgi://localhost" AllowOverride All - Order allow,deny - Allow from all -+ Require all granted AuthName "Zoneminder" AuthType Basic AuthBasicProvider external -@@ -19,6 +18,5 @@ +@@ -17,8 +31,34 @@ + + - AllowOverride All - Options ExecCGI FollowSymLinks +- AllowOverride All +- Options ExecCGI FollowSymLinks - Order allow,deny - Allow from all ++ SSLRequireSSL ++ AllowOverride None ++ Options +ExecCGI +FollowSymLinks + Require all granted ++ ++ ++# 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 ++ ++ +diff -Nur --no-dereference smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/23zoneminder smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/23zoneminder +--- smeserver-zoneminder-1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/23zoneminder 2022-08-01 00:26:08.189000000 -0400 ++++ smeserver-zoneminder-1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/23zoneminder 2022-08-01 01:24:37.446000000 -0400 +@@ -1 +1,11 @@ +-ScriptAlias /cgi-bin-zm /usr/libexec/zoneminder/cgi-bin ++#Zoneminder ++ ++# Auto Redirect HTTP requests to HTTPS ++RewriteEngine On ++RewriteCond %{HTTPS} !=on ++RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L] ++ ++# Order matters. This alias must come first. ++Alias /zm/cache "/var/cache/zoneminder" ++Alias /zm "/usr/share/zoneminder/www" ++ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"