30 lines
1.5 KiB
Bash
30 lines
1.5 KiB
Bash
systemctl stop apache2
|
|
|
|
##############
|
|
# Apache #
|
|
##############
|
|
|
|
a2dismod mpm_prefork
|
|
a2enmod actions fcgid alias proxy_fcgi ssl headers http2 setenvif socache_shmcb
|
|
|
|
mkdir -p /etc/apache2/snippets/
|
|
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/snippets-ssl.conf -O /etc/apache2/snippets/apa-ssl.conf
|
|
wget -q -t7 "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/conf-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/apache2/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/apache2/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/apache2/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.conf /etc/apache2/sites-enabled/"$sitename".conf
|
|
#ssl
|
|
wget -q -t7 -O - "$repo"/raw/branch/"$branch"/CoreModules/apache/config/apache2/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 |