From: Marcin Haba Date: Sat, 22 Dec 2018 18:23:08 +0000 (+0100) Subject: baculum: Adapt Apache configs to version 2.4 X-Git-Tag: Release-9.4.2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06d79bf5a6e5ede58d87c185bf2dd02c984951b3;p=thirdparty%2Fbacula.git baculum: Adapt Apache configs to version 2.4 --- diff --git a/gui/baculum/examples/deb-template/baculum-api-apache.conf b/gui/baculum/examples/deb-template/baculum-api-apache.conf index 23a820bdf7..73277c1aac 100644 --- a/gui/baculum/examples/deb-template/baculum-api-apache.conf +++ b/gui/baculum/examples/deb-template/baculum-api-apache.conf @@ -19,26 +19,57 @@ Listen 9096 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ index.php/$1 [L] RedirectMatch ^/$ /api/?api - Require all granted + # Apache 2.2 + + Order Allow,Deny + Allow from all + + # Apache 2.4 + + Require all granted + # - # NOTE: When you use OAuth2 then change this location section - # From: + # NOTE: When you use OAuth2 then change this Directory section + # From: + # ...section body... + # # To: + # ...section body... + # # - + + # AuthType Basic AuthName "Baculum Auth" AuthUserFile %DOCUMENTROOT/protected/API/Config/baculum.users Require valid-user - + # + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + diff --git a/gui/baculum/examples/deb-template/baculum-web-apache.conf b/gui/baculum/examples/deb-template/baculum-web-apache.conf index 06aff4d37c..adc96285c0 100644 --- a/gui/baculum/examples/deb-template/baculum-web-apache.conf +++ b/gui/baculum/examples/deb-template/baculum-web-apache.conf @@ -20,41 +20,87 @@ Listen 9095 RewriteRule ^(.*)$ index.php/$1 [L] RedirectMatch ^/$ /web/ - - SetEnvIf Request_URI "^/web/redirect$" noauth=1 - - AuthType Basic - AuthName "Baculum Auth" - AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users - - Order Deny,Allow - Satisfy Any - Deny from all - Require valid-user - Allow from env=noauth - Allow from env=REDIRECT_noauth - + + # Apache 2.2 + + + SetEnvIf Request_URI "^/web/redirect$" noauth=1 + + AuthType Basic + AuthName "Baculum Auth" + AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users + + Order Deny,Allow + Satisfy Any + Deny from all + Require valid-user + Allow from env=noauth + Allow from env=REDIRECT_noauth + + + + # Apache 2.4 + + + SetEnvIf Request_URI "^/web/redirect$" noauth=1 + + + + Require env noauth + Require env REDIRECT_noauth + + Require all granted + + + AuthType Basic + AuthName "Baculum Auth" + AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users + Require not env noauth + Require not env REDIRECT_noauth + Require valid-user + + + + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + - + mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.js$ mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* - - + + ExpiresActive On ExpiresDefault "access plus 864000 seconds" - - + + Header set Cache-Control "max-age=864000, private" - + diff --git a/gui/baculum/examples/rpm-template/baculum-api-apache.conf b/gui/baculum/examples/rpm-template/baculum-api-apache.conf index 23a820bdf7..73277c1aac 100644 --- a/gui/baculum/examples/rpm-template/baculum-api-apache.conf +++ b/gui/baculum/examples/rpm-template/baculum-api-apache.conf @@ -19,26 +19,57 @@ Listen 9096 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ index.php/$1 [L] RedirectMatch ^/$ /api/?api - Require all granted + # Apache 2.2 + + Order Allow,Deny + Allow from all + + # Apache 2.4 + + Require all granted + # - # NOTE: When you use OAuth2 then change this location section - # From: + # NOTE: When you use OAuth2 then change this Directory section + # From: + # ...section body... + # # To: + # ...section body... + # # - + + # AuthType Basic AuthName "Baculum Auth" AuthUserFile %DOCUMENTROOT/protected/API/Config/baculum.users Require valid-user - + # + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + diff --git a/gui/baculum/examples/rpm-template/baculum-web-apache.conf b/gui/baculum/examples/rpm-template/baculum-web-apache.conf index 06aff4d37c..adc96285c0 100644 --- a/gui/baculum/examples/rpm-template/baculum-web-apache.conf +++ b/gui/baculum/examples/rpm-template/baculum-web-apache.conf @@ -20,41 +20,87 @@ Listen 9095 RewriteRule ^(.*)$ index.php/$1 [L] RedirectMatch ^/$ /web/ - - SetEnvIf Request_URI "^/web/redirect$" noauth=1 - - AuthType Basic - AuthName "Baculum Auth" - AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users - - Order Deny,Allow - Satisfy Any - Deny from all - Require valid-user - Allow from env=noauth - Allow from env=REDIRECT_noauth - + + # Apache 2.2 + + + SetEnvIf Request_URI "^/web/redirect$" noauth=1 + + AuthType Basic + AuthName "Baculum Auth" + AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users + + Order Deny,Allow + Satisfy Any + Deny from all + Require valid-user + Allow from env=noauth + Allow from env=REDIRECT_noauth + + + + # Apache 2.4 + + + SetEnvIf Request_URI "^/web/redirect$" noauth=1 + + + + Require env noauth + Require env REDIRECT_noauth + + Require all granted + + + AuthType Basic + AuthName "Baculum Auth" + AuthUserFile %DOCUMENTROOT/protected/Web/Config/baculum.users + Require not env noauth + Require not env REDIRECT_noauth + Require valid-user + + + + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + + - Order Deny,Allow - Deny from all + # Apache 2.2 + + Order Deny,Allow + Deny from all + + + # Apache 2.4 + + Require all denied + - + mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.js$ mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* - - + + ExpiresActive On ExpiresDefault "access plus 864000 seconds" - - + + Header set Cache-Control "max-age=864000, private" - +