fixed domain config name

This commit is contained in:
Matthew Saunders Brown 2021-10-05 13:10:01 -07:00
parent 3ca32d6ba0
commit 8c68b39834

View File

@ -110,7 +110,7 @@ if [[ "$macro" == *"VHost"* ]]; then
exit 1
fi
macro_vhost_line="$macro_vhost_line $subdomain"
vhost_conf="$subdomain.$domain_conf"
vhost_conf="$subdomain.$domain.conf"
else
echo "subdomain (-o OPTION) not set"
exit 1
@ -179,11 +179,11 @@ if [[ "$macro" == *"HTTPS"* ]]; then
fi
# create / edit apache conf
echo "$macro_vhost_line" > /etc/apache2/sites-available/$domain_conf
echo "$macro_vhost_line" > /etc/apache2/sites-available/$domain.conf
# enable apache conf
if [[ ! -h /etc/apache2/sites-enabled/$domain_conf ]]; then
a2ensite --quiet $domain_conf
if [[ ! -h /etc/apache2/sites-enabled/$domain.conf ]]; then
a2ensite --quiet $domain.conf
fi
# restart apache