|
Компьютерный форум OSzone.net » Компьютеры + Интернет » Вебмастеру » [решено] Несколько сайтов на Apache |
|
|
[решено] Несколько сайтов на Apache
|
Пользователь Сообщения: 142 |
Добрый день, понимаю тема уже разжевана до мелочей, да и в документации к апачу тож есть примеры . Но у меня не получается сделать виртуальные хосты.
основной конфиг ServerRoot "C:/Server/Apache" Listen 80 #Загрузка модулей, все не копирую LoadModule php5_module C:/Server/php/php5apache2_2.dll AddType application/x-httpd-php .php <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> User daemon Group daemon </IfModule> </IfModule> DocumentRoot "C:/Server/vhosts" <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from none </Directory> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> ErrorLog "logs/error.log" LogLevel debug <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access.log" common </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "C:/Server/vhosts/cgi" </IfModule> <Directory "C:/Server/vhosts/cgi"> AllowOverride None Options None Order allow,deny Allow from all </Directory> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule> Include conf/extra/httpd-vhosts.conf <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> NameVirtualHost *:80 <VirtualHost 192.168.1.1> DocumentRoot "C:/Server/vhosts/ahs" ServerName ahs.ru ServerAlias www.ahs.ru ErrorLog "logs/www.ahs.ru-error.log" </VirtualHost> <VirtualHost 192.168.1.1> DocumentRoot "C:/Server/vhosts/fengOffice" ServerName www.feng.ahs.ru </VirtualHost> |
|
Отправлено: 02:14, 05-08-2010 |
Deadooshka Сообщения: 2562
|
Профиль | Отправить PM | Цитировать 1. логи сервера. 2. где прописана связь домен-IP. если не ДНС, то например в hosts...
|
Отправлено: 03:11, 06-08-2010 | #2 |
Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети. Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля. |
Пользователь Сообщения: 142
|
Профиль | Отправить PM | Цитировать 1. Логи ErrorLog "logs/www.ahs.ru-error.log" пустые, какие еще мб логи привести?
вот общий error [Fri Aug 06 11:34:02 2010] [notice] Apache/2.2.16 (Win32) PHP/5.2.14 configured -- resuming normal operations [Fri Aug 06 11:34:02 2010] [notice] Server built: Jul 30 2010 16:15:37 [Fri Aug 06 11:34:02 2010] [notice] Parent: Created child process 1272 [Fri Aug 06 11:34:02 2010] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Aug 06 11:34:02 2010] [warn] VirtualHost 192.168.1.1:0 overlaps with VirtualHost 192.168.1.1:0, the first has precedence, perhaps you need a NameVirtualHost directive [Fri Aug 06 11:34:02 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Aug 06 11:34:02 2010] [warn] VirtualHost 192.168.1.1:0 overlaps with VirtualHost 192.168.1.1:0, the first has precedence, perhaps you need a NameVirtualHost directive [Fri Aug 06 11:34:02 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Aug 06 11:34:02 2010] [notice] Child 1272: Child process is running [Fri Aug 06 11:34:02 2010] [info] Parent: Duplicating socket 272 and sending it to child process 1272 [Fri Aug 06 11:34:02 2010] [debug] mpm_winnt.c(408): Child 1272: Retrieved our scoreboard from the parent. [Fri Aug 06 11:34:02 2010] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1272 [Fri Aug 06 11:34:02 2010] [debug] mpm_winnt.c(564): Child 1272: retrieved 1 listeners from parent [Fri Aug 06 11:34:03 2010] [notice] Child 1272: Acquired the start mutex. [Fri Aug 06 11:34:03 2010] [notice] Child 1272: Starting 64 worker threads. [Fri Aug 06 11:34:03 2010] [notice] Child 1272: Starting thread to listen on port 80. [Fri Aug 06 11:34:18 2010] [notice] Parent: Received restart signal -- Restarting the server. [Fri Aug 06 11:34:18 2010] [warn] VirtualHost 192.168.1.1:0 overlaps with VirtualHost 192.168.1.1:0, the first has precedence, perhaps you need a NameVirtualHost directive [Fri Aug 06 11:34:18 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Aug 06 11:34:18 2010] [notice] Apache/2.2.16 (Win32) PHP/5.2.14 configured -- resuming normal operations [Fri Aug 06 11:34:18 2010] [notice] Server built: Jul 30 2010 16:15:37 [Fri Aug 06 11:34:18 2010] [notice] Parent: Created child process 720 [Fri Aug 06 11:34:18 2010] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Fri Aug 06 11:34:18 2010] [warn] VirtualHost 192.168.1.1:0 overlaps with VirtualHost 192.168.1.1:0, the first has precedence, perhaps you need a NameVirtualHost directive [Fri Aug 06 11:34:18 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Aug 06 11:34:18 2010] [warn] VirtualHost 192.168.1.1:0 overlaps with VirtualHost 192.168.1.1:0, the first has precedence, perhaps you need a NameVirtualHost directive [Fri Aug 06 11:34:18 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Aug 06 11:34:18 2010] [notice] Child 720: Child process is running [Fri Aug 06 11:34:18 2010] [info] Parent: Duplicating socket 272 and sending it to child process 720 [Fri Aug 06 11:34:18 2010] [debug] mpm_winnt.c(408): Child 720: Retrieved our scoreboard from the parent. [Fri Aug 06 11:34:18 2010] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 720 [Fri Aug 06 11:34:18 2010] [debug] mpm_winnt.c(564): Child 720: retrieved 1 listeners from parent [Fri Aug 06 11:34:19 2010] [info] Child 1272: Accept thread exiting. [Fri Aug 06 11:34:19 2010] [notice] Child 1272: Released the start mutex [Fri Aug 06 11:34:19 2010] [notice] Child 720: Acquired the start mutex. [Fri Aug 06 11:34:19 2010] [info] Child 1272: 64 threads blocked on the completion port [Fri Aug 06 11:34:19 2010] [notice] Child 720: Starting 64 worker threads. [Fri Aug 06 11:34:19 2010] [notice] Child 720: Starting thread to listen on port 80. [Fri Aug 06 11:34:20 2010] [notice] Child 1272: All worker threads have exited. [Fri Aug 06 11:34:20 2010] [notice] Child 1272: Child process is exiting |
Последний раз редактировалось Actor, 06-08-2010 в 04:45. Отправлено: 04:27, 06-08-2010 | #3 |
Deadooshka Сообщения: 2562
|
Профиль | Отправить PM | Цитировать ну из лога же видно, что NameVirtualHost неправильный...
примерно в таком духе (NameVirtualHost определяем для конкретных VirtualHost - по идее значения совпадать должны) NameVirtualHost 192.168.1.1:80 <VirtualHost 192.168.1.1:80> DocumentRoot "C:/Server/vhosts/ahs" ServerName ahs.ru ServerAlias www.ahs.ru ErrorLog "logs/www.ahs.ru-error.log" </VirtualHost> <VirtualHost 192.168.1.1:80> DocumentRoot "C:/Server/vhosts/fengOffice" ServerName www.feng.ahs.ru </VirtualHost> |
Отправлено: 16:44, 06-08-2010 | #4 |
Пользователь Сообщения: 142
|
Профиль | Отправить PM | Цитировать Исправил с виртуал хостом ошибку, тем не менее не заходит на те сайты кроме 1
[Mon Aug 09 11:39:03 2010] [notice] Apache/2.2.16 (Win32) PHP/5.2.14 configured -- resuming normal operations [Mon Aug 09 11:39:03 2010] [notice] Server built: Jul 30 2010 16:15:37 [Mon Aug 09 11:39:03 2010] [notice] Parent: Created child process 1408 [Mon Aug 09 11:39:03 2010] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Mon Aug 09 11:39:04 2010] [notice] Child 1408: Child process is running [Mon Aug 09 11:39:04 2010] [info] Parent: Duplicating socket 272 and sending it to child process 1408 [Mon Aug 09 11:39:04 2010] [debug] mpm_winnt.c(408): Child 1408: Retrieved our scoreboard from the parent. [Mon Aug 09 11:39:04 2010] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 1408 [Mon Aug 09 11:39:04 2010] [debug] mpm_winnt.c(564): Child 1408: retrieved 1 listeners from parent [Mon Aug 09 11:39:04 2010] [notice] Child 1408: Acquired the start mutex. [Mon Aug 09 11:39:04 2010] [notice] Child 1408: Starting 64 worker threads. [Mon Aug 09 11:39:05 2010] [notice] Child 1408: Starting thread to listen on port 80. |
|
Отправлено: 04:45, 09-08-2010 | #5 |
Deadooshka Сообщения: 2562
|
Профиль | Отправить PM | Цитировать Нужно отследить, на каком этапе не проходит запрос: мб не ресолвит ДНС у клиента, а если Апач получает запрос, то см. логи запросов. Если запущен IIS, то лучше отключить или развести с апачем по разным портам.
|
Отправлено: 16:42, 09-08-2010 | #6 |
Пользователь Сообщения: 142
|
Профиль | Отправить PM | Цитировать IIS не поднимался.
CustomLog "logs/www.ekn.ru-access.log" combined пустой. Какие еще варианты лога можно записать? |
Отправлено: 02:02, 10-08-2010 | #7 |
Deadooshka Сообщения: 2562
|
Профиль | Отправить PM | Цитировать обычно в корне апача в папке logs (access.log и error.log). Удалите их (забекапив), сделайте запрос, и смотрите логи с временем запроса.
|
Отправлено: 02:29, 10-08-2010 | #8 |
Пользователь Сообщения: 142
|
Профиль | Отправить PM | Цитировать Заполняется только error.log все остальное пустое
[Tue Aug 10 12:31:40 2010] [notice] Apache/2.2.16 (Win32) PHP/5.2.14 configured -- resuming normal operations [Tue Aug 10 12:31:40 2010] [notice] Server built: Jul 30 2010 16:15:37 [Tue Aug 10 12:31:40 2010] [notice] Parent: Created child process 3516 [Tue Aug 10 12:31:40 2010] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Tue Aug 10 12:31:40 2010] [notice] Child 3516: Child process is running [Tue Aug 10 12:31:40 2010] [info] Parent: Duplicating socket 272 and sending it to child process 3516 [Tue Aug 10 12:31:40 2010] [debug] mpm_winnt.c(408): Child 3516: Retrieved our scoreboard from the parent. [Tue Aug 10 12:31:40 2010] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 3516 [Tue Aug 10 12:31:40 2010] [debug] mpm_winnt.c(564): Child 3516: retrieved 1 listeners from parent [Tue Aug 10 12:31:40 2010] [notice] Child 3516: Acquired the start mutex. [Tue Aug 10 12:31:40 2010] [notice] Child 3516: Starting 64 worker threads. [Tue Aug 10 12:31:40 2010] [notice] Child 3516: Starting thread to listen on port 80. |
Отправлено: 05:34, 10-08-2010 | #9 |
Deadooshka Сообщения: 2562
|
Профиль | Отправить PM | Цитировать Как я понял, до апача запрос не доходит (если в логах нет запросов). Смотрите внешние причины, от клиентов до брандмауэров. Попробуйте добавить домен в hosts (если запрос пройдет, то проблема в ДНС).
|
Отправлено: 21:00, 10-08-2010 | #10 |
|
![]() |
Участник сейчас на форуме |
![]() |
Участник вне форума |
![]() |
Автор темы |
![]() |
Сообщение прикреплено |
| |||||
Название темы | Автор | Информация о форуме | Ответов | Последнее сообщение | |
Хабаровский суд обязал интернет провайдера закрыть доступ на несколько сайтов | Tigr | Флейм | 23 | 30-07-2010 15:56 | |
[решено] не открываются сайты антивирусов и еще несколько сторонних сайтов | Irena39rus | Лечение систем от вредоносных программ | 3 | 02-02-2010 06:14 | |
2008 - Список сайтов | Alex_Fox | Windows Server 2008/2008 R2 | 2 | 01-07-2009 13:22 | |
win 2003 несколько IP(inet) на несколько LAN? | Alexandr_l | Сетевые технологии | 11 | 03-04-2006 15:19 | |
может ли на одном сервере размещаться несколько сайтов? | Dos | Хочу все знать | 2 | 25-01-2004 01:23 |
|