added initial apache configuration/setup
This commit is contained in:
@@ -1 +1 @@
|
||||
apache2 php-pear libapache2-mod-php phpPHPver-mysql phpPHPver-cgi phpPHPver-common phpPHPver-mbstring phpPHPver-curl phpPHPver-gd phpPHPver-intl phpPHPver-soap phpPHPver-xml phpPHPver-xmlrpc phpPHPver-zip python-certbot-apache
|
||||
apache2 libapache2-mod-fcgid python-certbot-apache
|
||||
29
CoreModules/apache/conf.sh
Normal file
29
CoreModules/apache/conf.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
systemctl stop apache2
|
||||
|
||||
##############
|
||||
# Apache #
|
||||
##############
|
||||
|
||||
a2enmod actions fcgid alias proxy_fcgi ssl headers
|
||||
|
||||
mkdir -p /etc/apache2/snippets/
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/snippets-ssl.conf -O /etc/apache2/snippets/apa-ssl.conf
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/custom.conf -O /etc/apache2/conf-enabled/custom.conf
|
||||
|
||||
if [ $domainwww = 1 ]; then
|
||||
#non-ssl
|
||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||
echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||
#ssl
|
||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||
echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||
fi
|
||||
#non-ssl
|
||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf
|
||||
ln -s /etc/apache2/sites-available/"$sitename"_nossl /etc/apache2/sites-enabled/"$sitename".conf
|
||||
#ssl
|
||||
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||
sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf
|
||||
|
||||
systemctl start apache2
|
||||
1
CoreModules/apache/config/apache2/conf-custom.conf
Normal file
1
CoreModules/apache/config/apache2/conf-custom.conf
Normal file
@@ -0,0 +1 @@
|
||||
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
|
||||
6
CoreModules/apache/config/apache2/site-unconfigured
Normal file
6
CoreModules/apache/config/apache2/site-unconfigured
Normal file
@@ -0,0 +1,6 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName DOMAINname
|
||||
|
||||
#ConfHere
|
||||
|
||||
</VirtualHost>
|
||||
4
CoreModules/apache/config/apache2/site-wwwredir
Normal file
4
CoreModules/apache/config/apache2/site-wwwredir
Normal file
@@ -0,0 +1,4 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName www.DOMAINname
|
||||
Redirect permanent / http://DOMAINname/
|
||||
</VirtualHost>
|
||||
16
CoreModules/apache/config/apache2/site_ssl-unconfigured
Normal file
16
CoreModules/apache/config/apache2/site_ssl-unconfigured
Normal file
@@ -0,0 +1,16 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName DOMAINname
|
||||
Redirect permanent / https://DOMAINname/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName DOMAINname
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/DOMAINname/cert.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAINname/privkey.pem
|
||||
SSLCertificateChainFile /etc/letsencrypt/live/DOMAINname/chain.pem
|
||||
Include snippets/apa-ssl.conf
|
||||
|
||||
#ConfHere
|
||||
|
||||
</VirtualHost>
|
||||
14
CoreModules/apache/config/apache2/site_ssl-wwwredir
Normal file
14
CoreModules/apache/config/apache2/site_ssl-wwwredir
Normal file
@@ -0,0 +1,14 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName www.DOMAINname
|
||||
Redirect permanent / https://DOMAINname/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName www.DOMAINname
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/DOMAINname/cert.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAINname/privkey.pem
|
||||
SSLCertificateChainFile /etc/letsencrypt/live/DOMAINname/chain.pem
|
||||
Include snippets/apa-ssl.conf
|
||||
Redirect permanent / https://DOMAINname/
|
||||
</VirtualHost>
|
||||
7
CoreModules/apache/config/apache2/snippets-ssl.conf
Normal file
7
CoreModules/apache/config/apache2/snippets-ssl.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
Protocols h2 http/1.1
|
||||
Header always set Strict-Transport-Security "max-age=63072000"
|
||||
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
|
||||
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA2$
|
||||
SSLHonorCipherOrder off
|
||||
SSLSessionTickets off
|
||||
SSLUseStapling On
|
||||
1
CoreModules/apache/preconf.sh
Normal file
1
CoreModules/apache/preconf.sh
Normal file
@@ -0,0 +1 @@
|
||||
sudo add-apt-repository ppa:ondrej/apache2
|
||||
1
CoreModules/apache/reqmodules.sh
Normal file
1
CoreModules/apache/reqmodules.sh
Normal file
@@ -0,0 +1 @@
|
||||
aonoption="$aonoption php-fpm"
|
||||
Reference in New Issue
Block a user