Add 'CoreModules/apache/appendCMS-conf.sh'
This commit is contained in:
22
CoreModules/apache/appendCMS-conf.sh
Normal file
22
CoreModules/apache/appendCMS-conf.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
##############
|
||||||
|
# Apache #
|
||||||
|
##############
|
||||||
|
|
||||||
|
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/010-"$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 reload apache2
|
||||||
Reference in New Issue
Block a user