El host virtual Apache carga una página incorrecta cuando se utiliza una ruta

El host virtual Apache carga una página incorrecta cuando se utiliza una ruta

Tengo varios hosts virtuales configurados en mi servidor Apache (RedHat) que funcionan bien hasta que se utiliza una ruta. Para explicar.

Tengo:

  • https: //myserver1.com (sitio predeterminado)
  • https://myserver2.com
  • https://myserver3.com

Pero cuando un usuario llega a cualquiera de ellos, obtiene la página correcta y la URL se agrega a /PORTAL/STARTUP.php.

Pero si los usuarios luego marcan su página, por ejemplo, https: //myserver3.com/PORTAL/STARTUP.php, accederán al sitio predeterminado pero con la URL correcta.

¿Qué me he perdido?

<VirtualHost *:443>
    DocumentRoot /var/www/html/myserver1
    ServerName myserver1. com
    ErrorLog logs/myserver1-error_log
    CustomLog logs/myserver1-access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/myserver2
    ServerName myserver2.com
    ErrorLog logs/myserver2-error_log
    CustomLog logs/myserver2-access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/myserver3
    ServerName myserver3.com
    ErrorLog logs/myserver3_error_log
    CustomLog logs/myserver3_access_log common
</VirtualHost>

ACTUALIZAR

<VirtualHost 111.111.111.111:80>
        ServerAlias *
        RewriteEngine On
        RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [redirect=301]
</VirtualHost>

<VirtualHost 111.111.111.111:80>
        ServerAlias *
        RewriteEngine On
        RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [redirect=301]
</VirtualHost>

<filesMatch "\.(html|htm|js|css|png)$">
  FileETag None
  <ifModule mod_headers.c>
     Header unset ETag
     Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
     Header set Pragma "no-cache"
     Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
  </ifModule>
</filesMatch>

Header set X-Permitted-Cross-Domain-Policies: "master-only"
Header always set X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection: "1; mode=block"
Header set Access-Control-Allow-Origin "*"

<VirtualHost *:80>
    ServerName clientA.com
    DocumentRoot /var/www/html
    ErrorLog logs/clientA.com-error_log
    CustomLog logs/clientA.com-access_log common
</VirtualHost>

<VirtualHost *:443>
    ServerName clientB.com:443
    DocumentRoot /var/www/html
    Redirect / https://clientB.com/
    ErrorLog logs/clientB.error_log
    CustomLog logs/clientB.access_log common
</VirtualHost>

#<VirtualHost *:443>
   # DocumentRoot /var/www/html/clientC
    #ServerName www.clientC.com
    #ErrorLog logs/clientB.com-error_log
    #CustomLog logs/clientB.com-access_log common
#</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientD
    ServerName clientD.com
    ErrorLog logs/clientD.com-error_log
    CustomLog logs/clientD.com-access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientE
    ServerName clientE.com
    ErrorLog logs/clientD.com-error_log
    CustomLog logs/clientD.com-access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientF
    ServerName clientF.com
    ErrorLog logs/clientF.com_error_log
    CustomLog logs/clientF.com_access_log common
</VirtualHost>

<VirtualHost *:443>
  DocumentRoot /var/www/html/clientG
  ServerName clientG.com
  ErrorLog logs/clientG_error_log
  CustomLog logs/clientG_access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientH
    ServerName clientH.com
    ErrorLog logs/clientH_error_log
    CustomLog logs/clientH_access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientI
    ServerName clientI.com
    ErrorLog logs/clientI_error_log
    CustomLog logs/clientI_access_log common
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/html/clientJ
    ServerName clientJ.com
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

<VirtualHost *:443>
    ProxyPreserveHost On
    ProxyPass / http://111.111.111.111/
    ProxyPassReverse / http://11.111.111.111/
    ServerName clientK.com
    ErrorLog logs/clientK_error_log
    CustomLog logs/clientK_access_log common
</VirtualHost>

Luego, las entradas de vhost anteriores pasan a los clientes hasta J

información relacionada