Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 18/07/2006, à 10:32

Bixente

[Résolu] Probleme Apache

Salut

J'ai installé un serveur lamp il y a quelques temps mais depuis hier, il ne fonctionne pus.
A savoir lorseque je lance localhost dans un navigateur :

The connection has timed out
The server at localhost is taking too long to respond.

J'ai beau essayé de relancer ou de démarrer apache mais il y a toujours le même problème.

sudo /etc/init.d/apache2 start
 * Starting apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127 .0.0.1 for ServerName
httpd (pid 5185) already running
sudo /etc/init.d/apache2 reload
 * Reloading apache 2.0 configuration... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Si quelqu'un a une réponse, merci.

Dernière modification par Bixente (Le 19/07/2006, à 10:13)

Hors ligne

#2 Le 18/07/2006, à 10:53

Globule

Re : [Résolu] Probleme Apache

On peux voir ton fichier /etc/hosts ? et /etc/apache2/sites-available/"default" ?

Hors ligne

#3 Le 18/07/2006, à 10:59

Bixente

Re : [Résolu] Probleme Apache

Voici les deux fichiers demandés:

/etc/hosts a écrit :

127.0.0.1 localhost vincent
127.0.1.1 vincent

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/apache2/sites-available/default a écrit :

NameVirtualHost *
<VirtualHost *>
    ServerAdmin webmaster@localhost
   
    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        # Uncomment this directive is you want to see apache2's
        # default start page (in /apache2-default) when you go to /
        #RedirectMatch ^/$ /apache2-default/
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Je sais pas si ils sont correct mais je ne l'ai ai jamais modifiés.

Hors ligne

#4 Le 18/07/2006, à 11:25

Globule

Re : [Résolu] Probleme Apache

pardon ...

Dans /etc/apache2/sites-enable/ tu as quoi ?

Fais voir le fichier ?
Ton /etc/hosts me parais étrange ... ton 127.0.1.1 ca sert à quoi ?

Hors ligne

#5 Le 18/07/2006, à 11:44

Bixente

Re : [Résolu] Probleme Apache

Pour le fichier /etc/hosts, j'ai changé 127.0.1.1 par 127.0.0.1, pas de changement.

Et dans /etc/apache2/sites-enabled/, j'ai juste le fichier 000-default, je le copie:

NameVirtualHost *
<VirtualHost *>
    ServerAdmin webmaster@localhost
   
    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        # Uncomment this directive is you want to see apache2's
        # default start page (in /apache2-default) when you go to /
        #RedirectMatch ^/$ /apache2-default/
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Hors ligne

#6 Le 18/07/2006, à 12:54

fmo

Re : [Résolu] Probleme Apache

qu'est-ce que ca te dit si tu tapes ca?

telnet 127.0.0.1 80

Si ca te reponds un truc genre "connection refused" ou un truc dans le genre, il faut que tu verifies que ton firewall authorise le traffic TCP sur le port 80 ou alors que tu testes en desactivant le firewall.


www.terranux.net

Hors ligne

#7 Le 18/07/2006, à 14:17

Bixente

Re : [Résolu] Probleme Apache

Comme réponse, j'ai :

~$ telnet 127.0.0.1 80
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection timed out

Hors ligne

#8 Le 18/07/2006, à 15:09

Globule

Re : [Résolu] Probleme Apache

Édite /etc/apache2/apache2.conf et rajoute :

ServerName 127.0.0.1
ou
ServerName vincent (dans ton cas)

ensuite tu refais un :

sudo /etc/init.d/apache2 restart

PS :

Me demande aussi si ton /etc/hosts devrais pas avoir cette forme :


127.0.0.1 localhost.localdomain vincent
127.0.1.1 vincent

Hors ligne

#9 Le 18/07/2006, à 15:46

Bixente

Re : [Résolu] Probleme Apache

J'ai fait les changements que tu avais marqué.
Et j'ai toujours pas de changement.

Pour le 'ServerName vincent', je l'ai mis tout à la fin du fichier.

Et pour /etc/hosts, je ne pense pas qu'il faille rajouter .localdomain car dans ce cas là, http://localhost ne marche plus, c'est à dire qu'il me renvoit directement à une page qui n'a rien à voir (en l'occurence celle-ci).

J'ai malgré tout effectuer différents tests, mais toujours pas de réponses.

Je te remerci quand même de t'interesser à mon problème.

Hors ligne

#10 Le 18/07/2006, à 20:00

fmo

Re : [Résolu] Probleme Apache

Bixente a écrit :

Comme réponse, j'ai :

~$ telnet 127.0.0.1 80
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection timed out

T'as teste en arretant le firewall sur ton serveur?


www.terranux.net

Hors ligne

#11 Le 19/07/2006, à 10:12

Bixente

Re : [Résolu] Probleme Apache

En fin de compte, mon problème venait du réseau je crois.
Il faut avant de brancher ma clé wifi que j'aille dans Systeme -> Adlinistration -> Reseau, ensuite je branche ma clé et tout marche nickel.

Merci pour votre aide.

Hors ligne

#12 Le 22/07/2006, à 22:42

PixEye

Re : [Résolu] Probleme Apache

Salut,
J'avais le même message d'avertissement (mais mon serveur web fonctionnait) :

/etc/cron.daily/logrotate:
apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

Ma solution... remplacer les 2 premières lignes du fichier /etc/hosts par qqch de ce genre (où "bigpix" est le nom de ma machine) :

127.0.0.1       localhost.localnet      localhost
127.0.1.1       bigpix.localnet         bigpix

Dernière modification par PixEye (Le 22/07/2006, à 22:44)

Hors ligne