на апаче настроен основной сервер(
http://site1.ru/
) и виртуальный хост http://site2.ru/
норм робитно когда в браузере пишеш
WWW.site2.ru
выдает основной серв site1.ruкак настроить чтоб и на
WWW.site2.ru
норм работалоКод:
Код: Выделить всё
#
# Use name-based virtual hosting.
NameVirtualHost *:80
# # NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol. # # # VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known server name.
ServerAdmin admin@localhost
DocumentRoot /var/www/html/
ServerAdmin admin@localhost
UseCanonicalName Off
DocumentRoot /var/www/site2/www
ServerName site2
AddDefaultCharset CP1251
LogLevel warn
ErrorLog logs/site2_error_log
CustomLog logs/site2_access_log common
