install_httpd-2.4.sh: fix error in 00default. Rename '00default.conf' to '000-default.conf'.
This commit is contained in:
		| @@ -10,7 +10,7 @@ _backup_date="$(date +%Y%m%d-%H%M)" | |||||||
| ## - | ## - | ||||||
| _VSERVER_GUEST=no | _VSERVER_GUEST=no | ||||||
|  |  | ||||||
| _APACHE_VERSION=2.4.29 | _APACHE_VERSION=2.4.33 | ||||||
|  |  | ||||||
| _WITH_MOD_PROXY_FCGI=true | _WITH_MOD_PROXY_FCGI=true | ||||||
| _WITH_MOD_FCGID=true | _WITH_MOD_FCGID=true | ||||||
| @@ -3460,25 +3460,25 @@ if [ -f /etc/profile ]; then | |||||||
| fi | fi | ||||||
|  |  | ||||||
|  |  | ||||||
| ## - Add default vhost configuration file 00default.conf | ## - Add default vhost configuration file 000-default.conf | ||||||
| ## - | ## - | ||||||
| echo "" >> ${_logdir}/main.log | echo "" >> ${_logdir}/main.log | ||||||
| echo "## - Add default vhost configuration file 00default.conf.." >> ${_logdir}/main.log | echo "## - Add default vhost configuration file 000-default.conf.." >> ${_logdir}/main.log | ||||||
| echo "## -" >> ${_logdir}/main.log | echo "## -" >> ${_logdir}/main.log | ||||||
| echo "" | echo "" | ||||||
| echononl "\tAdd default vhost configuration file 00default.conf.." | echononl "\tAdd default vhost configuration file 000-default.conf.." | ||||||
| cat <<EOF > ${PREFIX}/conf/vhosts/00default.conf | cat <<EOF > ${PREFIX}/conf/vhosts/000-default.conf | ||||||
| ## - initial konfiguration -- ## | ## - initial konfiguration -- ## | ||||||
|  |  | ||||||
| ## - ipv4: $IPv4_FIRST | ## - ipv4: $IPv4_FIRST | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
| if [ -n "$IPv6_FIRST" ];then | if [ -n "$IPv6_FIRST" ];then | ||||||
|    cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf |    cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
| ## - ipv6: $IPv6_FIRST | ## - ipv6: $IPv6_FIRST | ||||||
| EOF | EOF | ||||||
| fi | fi | ||||||
| cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf | cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|  |  | ||||||
| SSLCompression off | SSLCompression off | ||||||
| SSLStrictSNIVHostCheck off | SSLStrictSNIVHostCheck off | ||||||
| @@ -3503,14 +3503,14 @@ DirectoryIndex index.html index.htm index.php index.php5 | |||||||
| EOF | EOF | ||||||
|  |  | ||||||
| if [[ ${#_php_socket_arr[@]} -gt 0 ]] ; then | if [[ ${#_php_socket_arr[@]} -gt 0 ]] ; then | ||||||
|    cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf |    cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|  |  | ||||||
|    ## - Make PHP-FPM status page and PHP-FPM ping available |    ## - Make PHP-FPM status page and PHP-FPM ping available | ||||||
|    ## - |    ## - | ||||||
| EOF | EOF | ||||||
|    for _val in ${_php_socket_arr[@]} ; do |    for _val in ${_php_socket_arr[@]} ; do | ||||||
|       IFS=':' read -a _val_arr <<< "${_val}" |       IFS=':' read -a _val_arr <<< "${_val}" | ||||||
|       cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf |       cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|    <FilesMatch "^(status-${_val_arr[0]}|ping-${_val_arr[0]})"> |    <FilesMatch "^(status-${_val_arr[0]}|ping-${_val_arr[0]})"> | ||||||
|       SetHandler "proxy:unix:${_val_arr[1]}|fcgi://127.0.0.1" |       SetHandler "proxy:unix:${_val_arr[1]}|fcgi://127.0.0.1" | ||||||
|    </FilesMatch> |    </FilesMatch> | ||||||
| @@ -3518,7 +3518,7 @@ EOF | |||||||
|    done |    done | ||||||
|  |  | ||||||
| else | else | ||||||
|    cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf |    cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|  |  | ||||||
|    ## - Make PHP-FPM status page and PHP-FPM ping available |    ## - Make PHP-FPM status page and PHP-FPM ping available | ||||||
|    ## - |    ## - | ||||||
| @@ -3528,52 +3528,12 @@ else | |||||||
| EOF | EOF | ||||||
| fi | fi | ||||||
|  |  | ||||||
| cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf | cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|  |  | ||||||
|    CustomLog /var/log/apache2/localhost.log combined |    CustomLog /var/log/apache2/localhost.log combined | ||||||
|    ErrorLog /var/log/apache2/localhost.error |    ErrorLog /var/log/apache2/localhost.error | ||||||
|  |  | ||||||
| </VirtualHost> | </VirtualHost> | ||||||
|  |  | ||||||
|  |  | ||||||
| # -- dummy.${_DOMAIN}.$_TLD -- # |  | ||||||
|  |  | ||||||
| <VirtualHost *:80> |  | ||||||
|  |  | ||||||
|    ServerName dummy.${_DOMAIN}.$_TLD |  | ||||||
|  |  | ||||||
|    RewriteEngine On |  | ||||||
|    RewriteCond %{HTTP_HOST} ^autoconfig\. [NC] |  | ||||||
|    RewriteRule ^/(.*)   http://autoconfig.${_DOMAIN}.${_TLD}/\$1 [L,R=301,NE] |  | ||||||
|    #RewriteCond %{HTTP_HOST} !^autoconfig\. [NC] |  | ||||||
|    #RewriteRule ^/(.*)   http://www.${_DOMAIN}.${_TLD} [L,R=301,NE] |  | ||||||
|  |  | ||||||
|    DocumentRoot "$GLOBAL_DOC_ROOT" |  | ||||||
|  |  | ||||||
|    CustomLog /var/log/apache2/dummy.${_DOMAIN}.${_TLD}.log combined |  | ||||||
|    ErrorLog /var/log/apache2/dummy.${_DOMAIN}.${_TLD}.error |  | ||||||
|  |  | ||||||
| </VirtualHost> |  | ||||||
| <VirtualHost *:443> |  | ||||||
|  |  | ||||||
|    ServerName dummy.${_DOMAIN}.$_TLD |  | ||||||
|  |  | ||||||
|    DocumentRoot "$GLOBAL_DOC_ROOT" |  | ||||||
|  |  | ||||||
|    SSLEngine on |  | ||||||
|  |  | ||||||
|    ## - don't support weak ciphers |  | ||||||
|    SSLHonorCipherOrder On |  | ||||||
|    SSLCompression Off |  | ||||||
|    SSLProtocol ALL -SSLv2 -SSLv3 |  | ||||||
|  |  | ||||||
|    SSLCertificateFile /usr/local/apache2/conf/server-bundle.crt |  | ||||||
|    SSLCertificateKeyFile /usr/local/apache2/conf/server.key |  | ||||||
|  |  | ||||||
|    CustomLog /var/log/apache2/dummy.${_DOMAIN}.${_TLD}.log combined |  | ||||||
|    ErrorLog /var/log/apache2/dummy.${_DOMAIN}.${_TLD}.error |  | ||||||
|  |  | ||||||
| </VirtualHost> |  | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -3588,31 +3548,49 @@ if [[ -n "${IPv6_FIRST}" ]]; then | |||||||
|    _default_ipv6=true |    _default_ipv6=true | ||||||
| fi | fi | ||||||
|  |  | ||||||
| _vhost_default="" | _vhost_default_80="<VirtualHost" | ||||||
| _vhost_default_80="" | _vhost_default_443="<VirtualHost" | ||||||
| _vhost_default_443="" | #if $_default_ipv4 && $_default_ipv6 ; then | ||||||
| if $_default_ipv4 && $_default_ipv6 ; then | #   for _ipv4 in $IPv4_ADDRESSESa; do | ||||||
|    _vhost_default="<VirtualHost $IPv4_ADDRESSES" | #      _vhost_default_80="$_vhost_default_80 $IPv4_ADDRESSES:80" | ||||||
|    for _ipv6 in $IPv6_ADDRESSES ; do | #      _vhost_default_443="$_vhost_default_443 $IPv4_ADDRESSES:443" | ||||||
|       _vhost_default="$_vhost_default [${_ipv6}]" | #   done | ||||||
|  | #   for _ipv6 in $IPv6_ADDRESSES ; do | ||||||
|  | #      _vhost_default_80="$_vhost_default_80 [${_ipv6}]:80" | ||||||
|  | #      _vhost_default_443="$_vhost_default_80 [${_ipv6}]:443" | ||||||
|  | #   done | ||||||
|  | #elif $_default_ipv4 ; then | ||||||
|  | #   for _ipv4 in $IPv4_ADDRESSESa; do | ||||||
|  | #      _vhost_default_80="$_vhost_default_80 $IPv4_ADDRESSES:80" | ||||||
|  | #      _vhost_default_443="$_vhost_default_443 $IPv4_ADDRESSES:443" | ||||||
|  | #   done | ||||||
|  | #elif $_default_ipv6 ; then | ||||||
|  | #   for _ipv6 in $IPv6_ADDRESSES ; do | ||||||
|  | #      _vhost_default_80="$_vhost_default_80 [${_ipv6}]:80" | ||||||
|  | #      _vhost_default_443="$_vhost_default_443 [${_ipv6}]:443" | ||||||
|  | #   done | ||||||
|  | #fi | ||||||
|  |  | ||||||
|  | if $_default_ipv4 ; then | ||||||
|  |    for _ipv4 in $IPv4_ADDRESSES; do | ||||||
|  |       [[ "$_ipv4" = "127.0.0.1" ]] && continue | ||||||
|  |       _vhost_default_80="$_vhost_default_80 $_ipv4:80" | ||||||
|  |       _vhost_default_443="$_vhost_default_443 $_ipv4:443" | ||||||
|    done |    done | ||||||
|    _vhost_default_80="${_vhost_default}:80>" |  | ||||||
|    _vhost_default_443="${_vhost_default}:443>" |  | ||||||
| elif $_default_ipv4 ; then |  | ||||||
|    _vhost_default_80="<VirtualHost ${IPv4_ADDRESSES}:80>" |  | ||||||
|    _vhost_default_443="<VirtualHost ${IPv4_ADDRESSES}:443>" |  | ||||||
| elif $_default_ipv6 ; then |  | ||||||
|    _vhost_default="<VirtualHost" |  | ||||||
|    for _ipv6 in $IPv6_ADDRESSES ; do |  | ||||||
|       _vhost_default="$_vhost_default [${_ipv6}]" |  | ||||||
|    done |  | ||||||
|    _vhost_default_80="${_vhost_default}:80>" |  | ||||||
|    _vhost_default_443="${_vhost_default}:443>" |  | ||||||
| fi | fi | ||||||
|  | if $_default_ipv6 ; then | ||||||
|  |    for _ipv6 in $IPv6_ADDRESSES ; do | ||||||
|  |       _vhost_default_80="$_vhost_default_80 [${_ipv6}]:80" | ||||||
|  |       _vhost_default_443="$_vhost_default_443 [${_ipv6}]:443" | ||||||
|  |    done | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | _vhost_default_80="$_vhost_default_80>" | ||||||
|  | _vhost_default_443="$_vhost_default_443>" | ||||||
|  |  | ||||||
| if $_default_ipv4 || $_default_ipv6 ; then | if $_default_ipv4 || $_default_ipv6 ; then | ||||||
|  |  | ||||||
|    cat <<EOF >> ${PREFIX}/conf/vhosts/00default.conf |    cat <<EOF >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
| $_vhost_default_80 | $_vhost_default_80 | ||||||
|  |  | ||||||
|    ServerName dummy.${_DOMAIN}.$_TLD |    ServerName dummy.${_DOMAIN}.$_TLD | ||||||
| @@ -3654,14 +3632,14 @@ fi | |||||||
|  |  | ||||||
|  |  | ||||||
| if [ -d "${PREFIX}/conf/vhosts/0" ] ; then | if [ -d "${PREFIX}/conf/vhosts/0" ] ; then | ||||||
|    echo "" >> ${PREFIX}/conf/vhosts/00default.conf |    echo "" >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
|    echo "Include conf/vhosts/0/*.conf" >> ${PREFIX}/conf/vhosts/00default.conf |    echo "Include conf/vhosts/0/*.conf" >> ${PREFIX}/conf/vhosts/000-default.conf | ||||||
| fi | fi | ||||||
| if [ "$?" = "0" ]; then | if [ "$?" = "0" ]; then | ||||||
|    echo_ok |    echo_ok | ||||||
| else | else | ||||||
|    echo_failed |    echo_failed | ||||||
|    warn "Adding vhost configfile 000default.conf failed." |    warn "Adding vhost configfile 0000-default.conf failed." | ||||||
| fi | fi | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -3829,7 +3807,7 @@ h2 { | |||||||
| <div class="Content"> | <div class="Content"> | ||||||
|  |  | ||||||
| <h1>HTTP Error 404</h1> | <h1>HTTP Error 404</h1> | ||||||
| <h2>The site you have requestet was not found on that Server</h2> | <h2>The site you have requestet was not found on this Server</h2> | ||||||
| <p>Please check your spelling and try again.</p> | <p>Please check your spelling and try again.</p> | ||||||
| <p>Thank You very much!</p> | <p>Thank You very much!</p> | ||||||
|  |  | ||||||
| @@ -3927,6 +3905,9 @@ if [[ -n "$_httpd_current_version" ]]; then | |||||||
|          if [[ "$(basename "$_name")" =~ 00default ]]; then |          if [[ "$(basename "$_name")" =~ 00default ]]; then | ||||||
|             continue |             continue | ||||||
|          fi |          fi | ||||||
|  |          if [[ "$(basename "$_name")" =~ 000-default ]]; then | ||||||
|  |             continue | ||||||
|  |          fi | ||||||
|          if [[ "$(basename "$_name")" = "000-logformat.conf" ]]; then |          if [[ "$(basename "$_name")" = "000-logformat.conf" ]]; then | ||||||
|             continue |             continue | ||||||
|          fi  |          fi  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user