Назад | Перейти на главную страницу

Субдомен переходит в другой домен

Я хотел бы иметь поддомен sarkastrunova.clevermarketing.cz

Если вы добавите его в браузер прямо сейчас, он преобразуется в horsetransport.cz который является другим виртуальным хостом на том же веб-сервере. И я не знаю почему.

DNS-записи A и AAAA из sarkastrunova.clevermarketing.cz разрешите мой сервер.

Конфигурационный файл для поддомена

# domain: sarkastrunova.clevermarketing.cz
# public: /var/www/html/sarkastrunova.clevermarketing.cz/public_html/
NameVirtualHost *:80
<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerName  sarkastrunova.clevermarketing.cz
  ServerAlias clevermarketing.cz
  ServerAdmin pavel@cleverstart.cz


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/html/sarkastrunova.clevermarketing.cz/public_html
  <Directory /var/www/html/sarkastrunova.clevermarketing.cz/public_html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -F info -finfo@clevermarketing.cz"
    </Directory>
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/html/sarkastrunova.clevermarketing.cz/log/error.log
  CustomLog /var/www/html/sarkastrunova.clevermarketing.cz/log/access.log combined
</VirtualHost>

Файл конфигурации для домена, в который он разрешается сейчас

# domain: horsetransport.cz
# public: /var/www/html/horsetransport.cz/public_html/

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin pavel@cleverstart.cz
  ServerName  horsetransport.cz
  ServerAlias www.horsetransport.cz

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/html/horsetransport.cz/public_html
  <Directory /var/www/html/horsetransport.cz/public_html>
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -F info -finfo@horsetransport.cz"
        AllowOverride All
    </Directory>
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/html/horsetransport.cz/log/error.log
  CustomLog /var/www/html/horsetransport.cz/log/access.log combined
</VirtualHost>

Причина, по которой субдомен не разрешается, должна быть очевидной. Любая помощь приветствуется

Ваш VirtualHost Сама конфигурация кажется прекрасной. Все ли файлы конфигурации включены в вашу конфигурацию? Вы можете проверить с помощью sudo apache2ctl -S. Вы перезагрузили Apache после изменения конфигурации (sudo systemtcl reload apache2)?