Konfiguracja serwerów, usług, itp.
czater
Posty: 70 Rejestracja: 05 września 2007, 08:56
Lokalizacja: Warszawa/Częstochowa
Post
autor: czater » 27 marca 2008, 09:50
Witam
Mam problem z uruchomieniem VIrtualHost-ów na Apache 2.2 (dystrybucja Debian 4.0 r3). Otóż chciałem na jednym numerze IP zrobić 2 strony działające na różnych portach np. 80 i 620. Wzorowałem się na dokumentacji Apacha
http://httpd.apache.org/docs/2.0/vhosts/examples.html , stworzyłem plik strona1 w katalogu /etc/apache2/sites-available oraz zrobiłem dowiązanie symboliczne dla pliku strona1 w katalogu /etc/apache/sites-enabled. Po zrestartowaniu usługi apache dostaje komunikat:
Kod: Zaznacz cały
(98) Address already in use: make_sock: could not bind to address [::]:80
(98) Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Oto zawartość pliku strona1 w katalogu /etc/apache2/sites-available
Kod: Zaznacz cały
Listen 80
Listen 620
NameVirtualHost 192.168.10.10:80
NameVirtualHost 192.168.10.10:620
<VirtualHost 192.168.10.10:80>
ServerName [url]http://www.example1.com[/url]
DocumentRoot /var/www/pierwszy
CustomLog /var/log/apache2/pierwszy.acces.log combined
ErrorLog /var/log/apache2/pierwszy.error.log
</VirtualHost>
<VirtualHost 192.168.10.10:620>
ServerName [url]http://www.example2.com[/url]
DocumentRoot /var/www/drugi
CustomLog /var/log/apache2/drugi.acces.log combined
ErrorLog /var/log/apache2/drugi.error.log
</VirtualHost>
[ Dodano : 2008-03-27, 10:14 ]
Yampress
Administrator
Posty: 6422 Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL
Post
autor: Yampress » 27 marca 2008, 11:01
zobacz czy istnieje taki plik
jeśli istnieje a apache nie jest uruchomiony to skasuj ten plik i wtedy wystartuj apache2
czater
Posty: 70 Rejestracja: 05 września 2007, 08:56
Lokalizacja: Warszawa/Częstochowa
Post
autor: czater » 27 marca 2008, 11:07
Plik istniał, apache był uruchomiony więc go zatrzymałem i przeniosłem plik do innego katalogu, po restarcie apacha znów ten sam komunikat co powyżej
Yampress
Administrator
Posty: 6422 Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL
Post
autor: Yampress » 27 marca 2008, 11:17
zajrzyj w loga apache co sie dzieje i wklej
na tym porcie cos już nie jest uruchomione? wyłącz apache i sprawdz czy port nadal nasłuchuje
czater
Posty: 70 Rejestracja: 05 września 2007, 08:56
Lokalizacja: Warszawa/Częstochowa
Post
autor: czater » 27 marca 2008, 11:40
sprawdziłem i po wyłączeniu apacha nic nie nadaje na 80 i pozostałym 620
Oto zawartość error.log
Kod: Zaznacz cały
[Wed Mar 26 08:27:00 2008] [notice] Apache/2.2.3 (Debian) configured -- resuming normal operations
[Wed Mar 26 08:35:28 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 08:35:31 2008] [notice] Apache/2.2.3 (Debian) configured -- resuming normal operations
[Wed Mar 26 08:35:31 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 08:35:33 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 26 09:07:00 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 09:07:03 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 26 09:07:18 2008] [notice] Graceful restart requested, doing restart
[Wed Mar 26 09:07:18 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 26 09:18:43 2008] [error] [client 192.168.10.128] File does not exist: /var/www/favicon.ico
[Wed Mar 26 09:18:43 2008] [error] [client 192.168.10.128] File does not exist: /var/www/favicon.ico
[Wed Mar 26 09:36:47 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 09:36:49 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 09:36:49 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 09:40:11 2008] [error] [client 192.168.10.63] File does not exist: /var/www/favicon.ico
[Wed Mar 26 09:40:12 2008] [error] [client 192.168.10.63] File does not exist: /var/www/favicon.ico
[Wed Mar 26 10:27:41 2008] [error] [client 192.168.10.225] File does not exist: /var/www/favicon.ico
[Wed Mar 26 10:27:41 2008] [error] [client 192.168.10.225] File does not exist: /var/www/favicon.ico
[Wed Mar 26 11:34:52 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 11:34:54 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 11:34:54 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 11:35:38 2008] [error] [client 192.168.10.203] File does not exist: /var/www/favicon.ico
[Wed Mar 26 11:35:47 2008] [error] [client 192.168.10.203] File does not exist: /var/www/favicon.ico
[Wed Mar 26 11:36:27 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 11:36:29 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 11:36:29 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 11:41:48 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 11:41:50 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 11:41:50 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 11:56:05 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 11:56:37 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 11:56:37 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 11:56:43 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 11:56:45 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 11:56:45 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:00:07 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:00:26 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:00:26 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:00:28 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:00:30 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:00:30 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:00:57 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:01:07 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:01:07 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:01:08 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:01:10 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:01:10 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:05:29 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:05:58 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:05:59 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:06:03 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:06:05 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:06:06 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 12:19:29 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 12:19:31 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 12:19:31 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 13:10:46 2008] [notice] caught SIGTERM, shutting down
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
[Wed Mar 26 13:13:48 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 13:13:48 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 13:13:50 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 13:13:52 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 13:13:52 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 13:18:02 2008] [notice] caught SIGTERM, shutting down
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /var/log/apache2/pierwsza/pierwszy.error.log.
Unable to open logs
[Wed Mar 26 14:46:19 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 14:46:19 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 14:46:22 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 14:46:24 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 14:46:24 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 14:48:18 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 14:48:20 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 14:48:21 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 14:49:52 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 14:49:54 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 14:49:54 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 14:51:30 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 14:51:32 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 14:51:32 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 15:02:13 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 15:02:16 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 15:02:16 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 15:06:19 2008] [notice] Graceful restart requested, doing restart
[Wed Mar 26 15:06:19 2008] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Wed Mar 26 15:06:19 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 15:06:30 2008] [notice] caught SIGTERM, shutting down
[Wed Mar 26 15:06:32 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Mar 26 15:06:32 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Wed Mar 26 15:08:49 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:09:31 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:09:31 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:09:35 2008] [error] [client 192.168.10.225] File does not exist: /var/www/favicon.ico
[Thu Mar 27 10:09:35 2008] [error] [client 192.168.10.225] File does not exist: /var/www/favicon.ico
[Thu Mar 27 10:11:28 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:12:04 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:12:04 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:19:19 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:19:21 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:19:21 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:28:05 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:34:55 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:34:55 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:39:16 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:39:18 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:39:18 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:40:37 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 10:44:44 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 10:44:44 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 10:51:36 2008] [error] [client 192.168.10.203] File does not exist: /var/www/pierwszy/info.php5
[Thu Mar 27 11:07:55 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 11:09:03 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 11:09:03 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 11:09:58 2008] [error] [client 192.168.10.203] File does not exist: /var/www/pierwszy/info.php5
[Thu Mar 27 11:19:05 2008] [notice] caught SIGTERM, shutting down
[Thu Mar 27 11:21:17 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Mar 27 11:21:17 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.5-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Thu Mar 27 11:23:07 2008] [notice] caught SIGTERM, shutting down
vikus
Beginner
Posty: 103 Rejestracja: 15 października 2007, 20:00
Post
autor: vikus » 27 marca 2008, 15:57
te wartosci
powinny byc w pliku
a nie w pliku konfiguracyjnym od virtualhost
czater
Posty: 70 Rejestracja: 05 września 2007, 08:56
Lokalizacja: Warszawa/Częstochowa
Post
autor: czater » 28 marca 2008, 09:25
Dziękuje, problem właśnie w tym był że miałem Listen w apache.conf a powinno być w ports.conf. Jeszcze raz dziękuje i pozdrawiam
Tom:-)
Beginner
Posty: 289 Rejestracja: 01 grudnia 2008, 13:52
Lokalizacja: Zakopane
Post
autor: Tom:-) » 03 września 2013, 18:27
Czy może ktoś to przedstawić jak to dokładnie ma wyglądać?