Skip to content

Commit 790a436

Browse files
committed
Implementing fix from issue #12.
Modified fail2ban monitoring of ModSecurity. Moved custom Apache2 settings to /etc/apache2/httpd.conf
1 parent ec6d5bf commit 790a436

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

build.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ echo "<VirtualHost *:80>
501501
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
502502
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
503503
504-
<FilesMatch \"\\.(cgi|shtml|phtml|php)$\">
504+
<FilesMatch \"\.(cgi|shtml|phtml|php)$\">
505505
SSLOptions +StdEnvVars
506506
</FilesMatch>
507507
<Directory /usr/lib/cgi-bin>
@@ -703,7 +703,10 @@ echo "---------------------------------------------------------------"
703703
echo "# Keep connections alive for only a few seconds
704704
KeepAlive On
705705
KeepAliveTimeout 3
706-
" >> /etc/apache2/conf.d/apache2-custom.conf
706+
707+
# Allow named virtual hosts on port 443
708+
NameVirtualHost *:443
709+
" >> /etc/apache2/httpd.conf
707710
#
708711
echo
709712
echo
@@ -950,7 +953,7 @@ maxretry = 3
950953
951954
enabled = true
952955
filter = modsecurity
953-
action = iptables-multiport[name=ModSecurity-$DOMAIN, port=\"http,https\"]
956+
action = iptables-multiport[name=ModSecurity, port=\"http,https\"]
954957
sendmail-buffered[name=ModSecurity, lines=10, dest=webmaster@$DOMAIN]
955958
logpath = /home/$USER/public_html/$DOMAIN/log/*error.log
956959
bantime = 600

0 commit comments

Comments
 (0)