mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
apache: Use drop-in config component for /etc files
Tests: - Config files are all symlinks in /etc/ - ttrss app's web interface works - Incorrect password attempts in LDAP login with /tt-rss-app/ get registered by fail2ban Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
86444764a7
commit
c6817ab462
4 files changed
+10
-1
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
# Proxy all PHP file requests through PHP-FPM.
|
||||
#
|
||||
# Based on /etc/apache2/conf-available/php7.3-fpm.conf but modified to not break
|
||||
# when PHP version upgrade happens due to php-fpm package depending on the
|
||||
# latest version of PHP. Since PHP-FPM unix sockets have version number their
|
||||
# path, to work with future version of PHP, hack assuming some future versions.
|
||||
|
||||
# Redirect to local php-fpm if mod_php is not available
|
||||
<IfModule !mod_php7.c>
|
||||
<IfModule proxy_fcgi_module>
|
||||
# Enable http authorization headers
|
||||
<IfModule setenvif_module>
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch ".+\.ph(ar|p|tml)$">
|
||||
<If "-e '/run/php/php-fpm.sock'">
|
||||
SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi://localhost"
|
||||
</If>
|
||||
<ElseIf "-e '/run/php/php7.4-fpm.sock'">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
|
||||
</ElseIf>
|
||||
<ElseIf "-e '/run/php/php7.3-fpm.sock'">
|
||||
SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost"
|
||||
</ElseIf>
|
||||
<Else>
|
||||
Require all denied
|
||||
</Else>
|
||||
</FilesMatch>
|
||||
<FilesMatch ".+\.phps$">
|
||||
# Deny access to raw php sources by default
|
||||
# To re-enable it's recommended to enable access to the files
|
||||
# only in specific virtual host or directory
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
# Deny access to files without filename (e.g. '.php')
|
||||
<FilesMatch "^\.ph(ar|p|ps|tml)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[apache-auth]
|
||||
enabled = true
|
||||
# Tweak the filter regex to work with journal format. Use apache-error as the
|
||||
# syslog facility
|
||||
filter = apache-auth[logtype="journal",logging="syslog",_daemon="apache-error"]
|
||||
journalmatch = SYSLOG_IDENTIFIER=apache-error
|
||||
Reference in new issue
Block a user