install_roundcube.sh: fis error creating vhost configuration.
This commit is contained in:
parent
d734611fa6
commit
7775ae21c6
@ -1244,7 +1244,7 @@ if $_create_vhost_config ; then
|
||||
cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
# -- $WEBSITE_NAME -- #
|
||||
|
||||
<VirtualHost ${_vhost_ip_string_80}:80>
|
||||
<VirtualHost ${_vhost_ip_string_80}>
|
||||
|
||||
ServerAdmin $WEBMASTER_EMAIL
|
||||
|
||||
@ -1260,18 +1260,18 @@ if $_create_vhost_config ; then
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
<VirtualHost ${_vhost_ip_string_443}:443>
|
||||
<VirtualHost ${_vhost_ip_string_443}>
|
||||
|
||||
ServerAdmin $WEBMASTER_EMAIL
|
||||
|
||||
ServerName $WEBSITE_NAME
|
||||
|
||||
EOF
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $? -ne 0 ]]; then
|
||||
failed=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$PHP_TYPE" = "mod_php" ]] ; then
|
||||
if [[ "$PHP_TYPE" = "mod_php" ]] ; then
|
||||
cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
## - its allowed to overwrite by .htaccess
|
||||
## -
|
||||
@ -1289,7 +1289,7 @@ EOF
|
||||
if [[ $? -ne 0 ]]; then
|
||||
failed=true
|
||||
fi
|
||||
elif [[ "$PHP_TYPE" = "fcgid" ]]; then
|
||||
elif [[ "$PHP_TYPE" = "fcgid" ]]; then
|
||||
cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
DocumentRoot "${WEBSITE_BASEDIR}/htdocs/"
|
||||
<Directory "${WEBSITE_BASEDIR}/htdocs">
|
||||
@ -1304,7 +1304,7 @@ EOF
|
||||
if [[ $? -ne 0 ]]; then
|
||||
failed=true
|
||||
fi
|
||||
elif [[ "$PHP_TYPE" = "php_fpm" ]]; then
|
||||
elif [[ "$PHP_TYPE" = "php_fpm" ]]; then
|
||||
cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
DocumentRoot "${WEBSITE_BASEDIR}/htdocs/"
|
||||
|
||||
@ -1333,8 +1333,8 @@ EOF
|
||||
if [[ $? -ne 0 ]]; then
|
||||
failed=true
|
||||
fi
|
||||
fi
|
||||
cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
fi
|
||||
cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
|
||||
# ==========
|
||||
# - HTTP security Headers
|
||||
@ -1441,8 +1441,9 @@ cat <<EOF >> ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||
</VirtualHost>
|
||||
|
||||
EOF
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $? -ne 0 ]]; then
|
||||
_failed=true
|
||||
fi
|
||||
fi
|
||||
if $_failed ; then
|
||||
echo_failed
|
||||
@ -1497,6 +1498,7 @@ echononl "\tRestart Apache Webservice.."
|
||||
if [[ -n "$APACHE_SERVICE_FILE" ]] || [[ -n "$APACHE_INIT_SCRIPT" ]] ; then
|
||||
if [[ -n "$APACHE_SERVICE_FILE" ]] ; then
|
||||
systemctl restart $APACHE_SERVICE_FILE > $log_file 2>&1
|
||||
echo "systemctl restart $APACHE_SERVICE_FILE > $log_file 2>&1"
|
||||
else
|
||||
$APACHE_INIT_SCRIPT restart > $log_file 2>&1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user