Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Serveurs (Apache, IIS,...) > Apache
Apache Forum d'entraide Apache. Avant de poster : Cours Apache, FAQ Apache
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/12/2011, 13h31   #1
Nouveau Membre du Club
 
Inscription : août 2007
Messages : 109
Détails du profil
Informations forums :
Inscription : août 2007
Messages : 109
Points : 31
Points : 31
Par défaut "Unable to open logs" au démarrage d'Apache

Bonjour à vous,

Je tourne depuis quelques heures sur un problème sans en trouver la solution! Je suis presque certain que cela doit être tout con...

En configurant le fichier listen.conf de cette manière je peux démarrer apache sans problème :
Code :
1
2
3
4
5
6
7
8
9
cat listen.conf
Listen 80
<IfDefine SSL>
 <IfDefine !NOSSL>
  <IfModule mod_ssl.c>
        Listen 443
  </IfModule>
 </IfDefine>
</IfDefine>
Code :
1
2
# service apache2 start
Starting httpd2 (prefork)                                                             done
Par contre en utilisant un virtualhost, cela ne fonctionne pas
J'ai essayé de simplifier au maximum mon fichier pour trouver le problème...
Code :
1
2
cat listen.conf
NameVirtualHost *:80
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 # cat test.conf
<VirtualHost *:80>
    ServerName schulung01.xxxx.net
    DocumentRoot /srv/www/htdocs/cacti
    ErrorLog /var/log/apache2/cacti-error_log
    CustomLog /var/log/apache2/cacti-access_log combined
    HostnameLookups Off
    UseCanonicalName Off
    ServerSignature On

    <Directory "/srv/www/htdocs/cacti">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Code :
1
2
3
4
5
 # service apache2 start
Starting httpd2 (prefork) no listening sockets available, shutting down
Unable to open logs
startproc:  exit status of parent of /usr/sbin/httpd2-prefork: 1
                                                                                      failed
Où peut être le problème????? droit d'accès??? mais où????
Et on voit bien qu'en générant cette erreur, apache n'écrit nulle part dans les logs!
Code :
1
2
3
4
5
6
7
8
# ll /var/log/apache2/
total 36
-rw-r--r--+ 1 root root 17311 Dec  6 12:10 access_log
-rw-r--r--+ 1 root root     0 Dec  5 16:46 cacti-access_log
-rw-r--r--+ 1 root root     0 Dec  6 10:39 cacti-error_log
-rw-r--r--+ 1 root root  1300 Dec  6 12:55 error_log
-rw-r--r--  1 root root    10 Dec  6 12:55 rcapache2.out
...
Quelqu'un a-t-il une piste? une idée?
nymus7 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/12/2011, 15h18   #2
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Salut,

Il te faut obligatoirement une directive Listen dans ton fichier de configuration. Sinon ton serveur apache ne pourra pas démarrer.

Exemple où j'ai mis mes directives Listen en commentaire:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
root@vm-ubuntu8:~# cat /etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
#Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
#    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
#    Listen 443
</IfModule>
root@vm-ubuntu8:~# /etc/init.d/apache2 start
* Starting web server apache2 no listening sockets available, shutting down
Unable to open logs
__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/12/2011, 15h48   #3
Nouveau Membre du Club
 
Inscription : août 2007
Messages : 109
Détails du profil
Informations forums :
Inscription : août 2007
Messages : 109
Points : 31
Points : 31
Ah! ben oui... évidemment! Il me semblait bien que j'étais prêt du but...

Merci beaucoup pour ton aide

Salutations
nymus7 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 21h50.


 
 
 
 
Partenaires

Hébergement Web