Override file 000-dehydrated.conf even if it exists yet.

This commit is contained in:
Christoph 2020-04-06 11:02:34 +02:00
parent fc889b5469
commit 38b620bcb3

View File

@ -375,33 +375,30 @@ if [[ -n "$APACHE_CONF_DIR" ]]; then
_apache_dh_conf_file=${APACHE_CONF_DIR}/000-dehydrated.conf
echononl " Configure Apache Webserver: Create alias for WELL-KNOWN Directory.."
if [[ -f "$_apache_dh_conf_file" ]] ; then
echo_skipped
else
if [[ -x "$apache_control_script" ]] && $apache_control_script -M 2> /dev/null | grep -q version_module > /dev/null 2>&1 ; then
cat << EOF > $_apache_dh_conf_file
Alias /.well-known/acme-challenge /var/www/dehydrated/
if [[ -x "$apache_control_script" ]] && $apache_control_script -M 2> /dev/null | grep -q version_module > /dev/null 2>&1 ; then
cat << EOF > $_apache_dh_conf_file
Alias /.well-known/acme-challenge ${DH_WELL_KNOWN_DIR}/
<Directory /var/www/dehydrated/>
Options +FollowSymLinks
AllowOverride None
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
Satisfy Any
</IfVersion>
Options +FollowSymLinks
AllowOverride None
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
Satisfy Any
</IfVersion>
</Directory>
EOF
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
fi
if [[ $? -eq 0 ]] ; then
echo_ok
else
cat << EOF > $_apache_dh_conf_file
echo_failed
fi
else
cat << EOF > $_apache_dh_conf_file
Alias /.well-known/acme-challenge ${DH_WELL_KNOWN_DIR}/
# - Notice:
@ -411,20 +408,19 @@ Alias /.well-known/acme-challenge ${DH_WELL_KNOWN_DIR}/
# - Allow from all
# -
<Directory /var/www/dehydrated/>
Options +FollowSymLinks
AllowOverride None
Require all granted
Satisfy Any
Options +FollowSymLinks
AllowOverride None
Require all granted
Satisfy Any
</Directory>
EOF
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
fi
if [[ $? -eq 0 ]] ; then
echo_ok
else
echo_failed
fi
apache_config_changed=true
fi
apache_config_changed=true
if $_set_apache_conf_symlink ; then
echononl " Activate \"000-dehydrated.conf\" .. "