Problemas com a configuração do vhost

0

Eu tenho grandes problemas (para grandes problemas) com a configuração fantasma. Eu tenho dois tdl diferentes e três subdomínios

O conf de tdl 1 é:

    <VirtualHost ip:80>
        ServerName www.example.org
        ServerAlias example.org
        ServerAdmin [email protected]
        DocumentRoot /var/www/www.example.org/
        DirectoryIndex index.html index.php

        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        <Directory /var/www/www.example.org/>
                Options +Indexes -FollowSymLinks
                AllowOverride None
        </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.example.org [OR]
RewriteCond %{SERVER_NAME} =example.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

O segundo tdl

<VirtualHost ip:80>
        ServerName www.test.org
        ServerAlias test.org
        ServerAdmin [email protected]
        DocumentRoot /var/www/www.test.org/
        DirectoryIndex index.html index.php

        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        <Directory /var/www/www.test.org/>
                Options +Indexes -FollowSymLinks
                AllowOverride None
        </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.test.org [OR]
RewriteCond %{SERVER_NAME} =test.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Isso é conf de 1 subdomínio

<VirtualHost de.example.org:80>
        ServerName www.de.expample.org
        ServerAlias de.example.org
        ServerAdmin [email protected]
        DocumentRoot /var/www/de.example.org/
        DirectoryIndex index.html index.php

        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        <Directory /var/www/de.example.org/>
                Options +Indexes -FollowSymLinks
                AllowOverride None
        </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =de.example.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

O conf do subdomínio

en.example.org

é o mesmo somente en.

As regras de reescrita são de Let's Encrypt

Mas ambos os TDL me redirecionam para o sub-domínio. o outro subdomínio funciona bem e me redireciona para a pasta correta.

não faço ideia .... thanx

    
por KarlNapp 16.05.2018 / 13:40

0 respostas