From 4bf8d740a68345ce75de7bcd8ec62b2271d1f979 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Thu, 19 Mar 2026 20:00:02 +0000 Subject: [PATCH] Updates for apache http configs. --- .gitattributesdb | 16 +++++ etc/apache2/apache2.conf | 24 +++---- etc/apache2/mods-enabled/proxy_http.load | 1 + etc/apache2/mods-enabled/socache_shmcb.load | 1 + etc/apache2/mods-enabled/ssl.load | 1 + .../core.slackware.uk.net.conf | 62 ++++++++++++++++--- .../00-core.slackware.uk.net.conf | 1 + 7 files changed, 82 insertions(+), 24 deletions(-) create mode 120000 etc/apache2/mods-enabled/proxy_http.load create mode 120000 etc/apache2/mods-enabled/socache_shmcb.load create mode 120000 etc/apache2/mods-enabled/ssl.load create mode 120000 etc/apache2/sites-enabled/00-core.slackware.uk.net.conf diff --git a/.gitattributesdb b/.gitattributesdb index ca42c15..0aea388 100644 --- a/.gitattributesdb +++ b/.gitattributesdb @@ -66,9 +66,21 @@ ZXRjL2FwYWNoZTIvbW9kcy1lbmFibGVkL3Byb3h5X2ZjZ2kubG9hZA== 1771512801.568005995 17 ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - YXBhY2hlMg== - - bW9kcy1lbmFibGVk - - +ZXRjL2FwYWNoZTIvbW9kcy1lbmFibGVkL3Byb3h5X2h0dHAubG9hZA== 1773512305.071354981 1773512305.071354981 root:root 0777 - - +ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - +YXBhY2hlMg== - - +bW9kcy1lbmFibGVk - - ZXRjL2FwYWNoZTIvbW9kcy1lbmFibGVkL3Jld3JpdGUubG9hZA== 1773519967.649760800 1773519967.649760800 root:root 0777 - - ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - YXBhY2hlMg== - - +bW9kcy1lbmFibGVk - - +ZXRjL2FwYWNoZTIvbW9kcy1lbmFibGVkL3NvY2FjaGVfc2htY2IubG9hZA== 1773343134.250327036 1773343134.250327036 root:root 0777 - - +ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - +YXBhY2hlMg== - - +bW9kcy1lbmFibGVk - - +ZXRjL2FwYWNoZTIvbW9kcy1lbmFibGVkL3NzbC5sb2Fk 1773343014.364235719 1773343014.364235719 root:root 0777 - - +ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - +YXBhY2hlMg== - - c2l0ZXMtYXZhaWxhYmxl - - ZXRjL2FwYWNoZTIvc2l0ZXMtYXZhaWxhYmxlLy5naXRpZ25vcmU= 1766069274.068541443 1766069263.648712326 root:root 0644 - - ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - @@ -76,6 +88,10 @@ YXBhY2hlMg== - - c2l0ZXMtYXZhaWxhYmxl - - ZXRjL2FwYWNoZTIvc2l0ZXMtYXZhaWxhYmxlL2NvcmUuc2xhY2t3YXJlLnVrLm5ldC5jb25m 1773519943.102151242 1757785113.000000000 root:root 0644 - - ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - +YXBhY2hlMg== - - +c2l0ZXMtZW5hYmxlZA== - - +ZXRjL2FwYWNoZTIvc2l0ZXMtZW5hYmxlZC8wMC1jb3JlLnNsYWNrd2FyZS51ay5uZXQuY29uZg== 1773340506.404142422 1773340506.404142422 root:root 0777 - - +ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - YXB0 - - ZXRjL2FwdC8uZ2l0aWdub3Jl 1762532662.236312315 1762532566.409854495 root:root 0644 - - ZXRj 1773949446.172698365 1771501908.000000000 root:root 0755 - - diff --git a/etc/apache2/apache2.conf b/etc/apache2/apache2.conf index 8f6332d..3379e2c 100644 --- a/etc/apache2/apache2.conf +++ b/etc/apache2/apache2.conf @@ -12,7 +12,7 @@ LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so #LoadModule unixd_module /usr/lib/apache2/mod_unixd.so -# Load extra modules. +# Load optional modules. IncludeOptional /etc/apache2/mods-enabled/*.load @@ -34,9 +34,9 @@ ServerSignature Email ServerTokens Major User www-data Group www-data -DefaultRuntimeDir /var/run/apache2 -PidFile /var/run/apache2/apache2.pid -ScriptSock /var/run/apache2/cgid.sock +DefaultRuntimeDir /run/apache2 +PidFile /run/apache2/apache2.pid +ScriptSock /run/apache2/socks/cgid.sock Mutex pthread @@ -44,7 +44,7 @@ Mutex pthread LogFormat "%h %l %u %t \"%r\" %>s %b" Common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" Combined LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" VHostCombined -CustomLog "|/usr/bin/logger -p local1.info -t httpd" VHostCombined env=!no_log +CustomLog "|/usr/bin/logger -p local5.info -t httpd" VHostCombined env=!no_log LogLevel warn allowmethods:crit authz_core:crit LogLevel include:crit @@ -52,7 +52,7 @@ LogLevel warn allowmethods:crit authz_core:crit LogLevel ssl:crit -ErrorLog syslog:local0 +ErrorLog syslog:local4 # Resource limits for event MPM. @@ -128,7 +128,7 @@ BrowserMatch "Konqueror/4" redirect-carefully DirectoryIndex index.php index.phtml - SetHandler proxy:unix:/run/php-fpm83/php-fpm.sock|fcgi://localhost/ + SetHandler proxy:unix:/run/php/php-fpm.sock|fcgi://localhost/ @@ -170,7 +170,7 @@ MIMEMagicFile /etc/apache2/magic # Lets Encrypt validation. -Alias /.well-known/acme-challenge/ /srv/dehydrated/ +Alias /.well-known/acme-challenge/ /var/www/dehydrated/ # Access control. @@ -184,13 +184,7 @@ Alias /.well-known/acme-challenge/ /srv/dehydrated/ Require all denied - - Options None - AllowOverride None - Require all granted - - - + Options None AllowOverride None Require all granted diff --git a/etc/apache2/mods-enabled/proxy_http.load b/etc/apache2/mods-enabled/proxy_http.load new file mode 120000 index 0000000..5e45913 --- /dev/null +++ b/etc/apache2/mods-enabled/proxy_http.load @@ -0,0 +1 @@ +../mods-available/proxy_http.load \ No newline at end of file diff --git a/etc/apache2/mods-enabled/socache_shmcb.load b/etc/apache2/mods-enabled/socache_shmcb.load new file mode 120000 index 0000000..f729f78 --- /dev/null +++ b/etc/apache2/mods-enabled/socache_shmcb.load @@ -0,0 +1 @@ +../mods-available/socache_shmcb.load \ No newline at end of file diff --git a/etc/apache2/mods-enabled/ssl.load b/etc/apache2/mods-enabled/ssl.load new file mode 120000 index 0000000..9d79723 --- /dev/null +++ b/etc/apache2/mods-enabled/ssl.load @@ -0,0 +1 @@ +../mods-available/ssl.load \ No newline at end of file diff --git a/etc/apache2/sites-available/core.slackware.uk.net.conf b/etc/apache2/sites-available/core.slackware.uk.net.conf index 2b9c4a0..06531c3 100644 --- a/etc/apache2/sites-available/core.slackware.uk.net.conf +++ b/etc/apache2/sites-available/core.slackware.uk.net.conf @@ -1,17 +1,48 @@ - - Options FollowSymlinks - AllowOverride None - Require all granted + + Options +FollowSymLinks + AllowOverride All + Require all granted + + + RewriteEngine On + RewriteBase //wiki + RewriteRule ^lib - [L] + RewriteRule ^doku.php - [L] + RewriteRule ^feed.php - [L] + RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] + RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] + RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] + RewriteRule ^$ doku.php [L] + RewriteRule (.*) doku.php?id=$1 [QSA,L] + - - # include /etc/fusiondirectory/fusiondirectory.secrets + + Require all denied + + + Options FollowSymLinks AllowOverride None Require all granted - AddType application/wasm .wasm + + AddType application/wasm .wasm + + IncludeOptional /etc/fusiondirectory/fusiondirectory.secrets + + Options FollowSymLinks + AllowOverride None + Require all granted + + + + Options FollowSymlinks + AllowOverride None + Require all granted + + ServerName core.slackware.uk.net @@ -38,7 +69,20 @@ DocumentRoot /data/sites/core.slackware.uk.net/html - Alias /fd /srv/fusiondirectory/html - Alias /pla /srv/pla + Alias /fd /usr/share/fusiondirectory/html + Alias /javascript /usr/share/javascript + Alias /pla /usr/share/phpldapadmin/htdocs + Alias /wiki /usr/share/dokuwiki/ + AliasMatch ^/wiki/sites/[^/]+$ /usr/share/dokuwiki/ + AliasMatch ^/wiki/sites/[^/]+/(.*)$ /usr/share/dokuwiki/$1 + + + Require all granted + + # Dot NOT add backslashes to the end of the urls. + ProxyPass /prometheus http://127.0.0.1:9090 + ProxyPassReverse /prometheus http://127.0.0.1:9090 + ProxyPass /ts http://127.0.0.1:9200 + ProxyPassReverse /ts http://127.0.0.1:9200 diff --git a/etc/apache2/sites-enabled/00-core.slackware.uk.net.conf b/etc/apache2/sites-enabled/00-core.slackware.uk.net.conf new file mode 120000 index 0000000..95be8ba --- /dev/null +++ b/etc/apache2/sites-enabled/00-core.slackware.uk.net.conf @@ -0,0 +1 @@ +../sites-available/core.slackware.uk.net.conf \ No newline at end of file