Беспорядок о VHost и Записи DNS относительно Конфигурации Субдомена (Apache)

Я предлагаю, чтобы Вы запустили свой сервер и просто ввели утилиту "BIOS" RAID-контроллера с Ctrl-M. Вы сможете создать, удалить, восстановить RAID-массивы.

0
задан 7 February 2012 в 12:56
2 ответа

Если у вас есть запись с подстановочными знаками, указывающая на IP-адрес вашего поддомена, вам не понадобится более конкретная запись app1 A, об этом позаботится подстановочный знак. Браузер пользователя отправляет:

Host: app1.example.com

Когда он делает запрос для этого домена, именно так Apache узнает, какой домен хочет клиент. Запись с подстановочными знаками скажет браузеру отправить этот запрос на ваш сервер.

2
ответ дан 4 December 2019 в 12:48

Hmm, I think that perhaps part of the problem is the usage of '=' in setting DocumentRoot. Unless that is some alternative syntax that is rarely used the apache documentation appears to recommend using something like 'DocumentRoot /foo/bar' where /foo/bar is the document root you want. See http://httpd.apache.org/docs/2.1/mod/core.html#documentroot . With regards to your dns issue, the user's browser will send the host header, which if you have the NameVirtualHosts directive set prooerly, will cause the VirtualHost directive with the matching ServerName or ServerAlias to be used. You can configure your DNS server with either a wildcard '*' entry or specific entries or both - the browser will still send the appropriate hosts header.

1
ответ дан 4 December 2019 в 12:48

Теги

Похожие вопросы