Change name of configuration file to 'create_vhost.conf'.
This commit is contained in:
parent
afdb4bf7ff
commit
c3a13d935e
@ -273,10 +273,10 @@ CREATE_SYMLINK_WEB_BASE_DIR=false
|
||||
# ---
|
||||
|
||||
script_base_dir="$(realpath $(dirname $0))"
|
||||
conf_file="${script_base_dir}/conf/create_vhost_php.conf"
|
||||
conf_file="${script_base_dir}/conf/create_vhost.conf"
|
||||
|
||||
echo ""
|
||||
echononl "\tInclude Configuration file.."
|
||||
echononl "\tInclude Configuration file '$conf_file'.."
|
||||
if [[ ! -f $conf_file ]]; then
|
||||
echo_skipped
|
||||
else
|
||||
@ -2042,8 +2042,16 @@ EOF
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
|
||||
EOF
|
||||
if $_https_only ; then
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
RewriteRule (.*) https://${rewrite_url} [R=301,L]
|
||||
EOF
|
||||
else
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
RewriteRule (.*) http://${rewrite_url} [R=301,L]
|
||||
EOF
|
||||
fi
|
||||
if [ -n "$_custom_ip_log" ]; then
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
|
||||
@ -2834,7 +2842,6 @@ fi
|
||||
for _alias in "${_server_aliases_arr[@]}" ; do
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
# --- $_alias
|
||||
|
||||
EOF
|
||||
if [ "$?" != "0" ]; then
|
||||
_failed=true
|
||||
@ -2842,10 +2849,12 @@ EOF
|
||||
done
|
||||
if [ "$_ipv6" != "disabled" ]; then
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
|
||||
<VirtualHost $_ipv4:80 [$_ipv6]:80>
|
||||
EOF
|
||||
else
|
||||
cat <<EOF >> ${_new_vhost_config_file}
|
||||
|
||||
<VirtualHost $_ipv4:80>
|
||||
EOF
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user