Test installation Apache : problèmes !

Résolu
Bonjour,

Je viens d'installer Apache (httpd.2.2.4) !
L'installation basique s'est bien déroulée : lorsque je tape http://localhost/ dans mon navigateur : j'obtiens une page avec "It works" (je suppose que cela fonctionne !)

Mon problème :
j'ai modifié dans le fichier httpd.conf de telle manière :
User nobody
Group nobody
et là losque je tape la commande :
./bin/apachectl -k [stop start restart ou graceful] j'ai la réponse :
httpd: bad group name nobody

Autre question : il semble que les processus ne se terminent pas :
[root@localhost apache2]# ./bin/apachectl -k restart
httpd: bad group name nobody
[root@localhost apache2]# ps aux | grep apache
root 7353 0.0 0.1 3480 1572 ? Ss 12:02 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7363 0.0 0.1 3768 1664 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7364 0.0 0.1 3768 1708 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7365 0.0 0.1 3768 1708 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7366 0.0 0.1 3768 1676 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7367 0.0 0.1 3768 1308 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7453 0.0 0.1 3768 1308 ? S 12:13 0:00 /usr/local/apache2/bin/httpd -k graceful
root 7577 0.0 0.0 2964 752 pts/0 R+ 12:34 0:00 grep --color apache
[root@localhost apache2]# ./bin/apachectl -k stop
httpd: bad group name nobody
[root@localhost apache2]# ps aux | grep apache
root 7353 0.0 0.1 3480 1572 ? Ss 12:02 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7363 0.0 0.1 3768 1664 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7364 0.0 0.1 3768 1708 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7365 0.0 0.1 3768 1708 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7366 0.0 0.1 3768 1676 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7367 0.0 0.1 3768 1308 ? S 12:03 0:00 /usr/local/apache2/bin/httpd -k graceful
toto 7453 0.0 0.1 3768 1308 ? S 12:13 0:00 /usr/local/apache2/bin/httpd -k graceful
root 7582 0.0 0.0 2960 764 pts/0 S+ 12:35 0:00 grep --color apache

D'avance merci !

bob
Configuration: Linux Mandriva
Firefox 1.5.0.7

11 réponses

  1. Modérateur
    Mets par exemple
    ServerName 127.0.0.1
    Si la commande
    debian:/home/lami20j# grep localhost /etc/hosts
    127.0.0.1       localhost.localdomain   localhost
    te donne un résultat semblable tu peux aussi écrire
    ServerName localhost
    
    1. OK ! Résolu !

      j'ai rajouté dans le fichier httpd.conf :
      ServerName localhost

      .....et il n'y a plus de message d'erreur !

      Merci beaucoup ! :-))
    2. @lami20jC`etait super comme aide et en plus tres simplement explique.gr0s bravo
    3. Bonjour voila moi mon problème est que quand je fait démaré j'ai 2 fenetre qui s'affiche tout le temps et reste comme sa on ma dit de redémarer mes rien a fair que fair svp ???
  2. Administration de Apache2 sous Linux ...

    Configuration et exemple :

    http://www.artduweb.com/unix-linux/http
    1. moi j'ai un problème avec XAMPP avec apache je clic sur démarer et ça s'enleve 1 seconde je tappe dans le barre d'adresse localhost et ça fonctionne pas aider moi !! j'aurais beacoup besoin d'aide voici mon adresse pour me parler kev_le_bo@hotmail.com
      1. Modérateur
        grep -i servername /chemin/vers/httpd.conf 
        te donne quoi
        1. voici la réponse :

          [root@localhost conf]# grep -i servername /usr/local/apache2/conf/httpd.conf
          # ServerName gives the name and port that the server uses to identify itself.
          #ServerName www.example.com:80
          [root@localhost conf]#

          Que dois-je incrire dans le fichier httpd.conf ?

          Est-ce que localhost serait correct ?

          Merci à toi lami20j

          bob
      2. Re-,

        Je poursuis mes bidouillages sur Apache !
        J'ai récupéré le fichier http.conf original qui remplace donc l'ancien fichier httpd.conf (j'avais fait des modif. mais impossible de me souvenir lesquelles!).
        Bref voici en fait ce que j'ai dans le fichier original :
        User daemon
        Group daemon

        Si je tape http://localhost/ dans mon navigateur cela fonctionne !

        Mais voici le message d'eereur que j'obtiens lorsque je relance Apache :

        [root@localhost apache2]# ./bin/apachectl stop
        httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
        [root@localhost apache2]#
        [root@localhost apache2]# ./bin/apachectl graceful
        httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
        httpd not running, trying to start
        [root@localhost apache2]# ./bin/apachectl start
        httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
        httpd (pid 9500) already running
        [root@localhost apache2]#

        Une idée svp ?

        D'avance merci.

        Hafed
        1. En effet pourquoi pas ?
          L'habitude de voir nobody dans les docs !
          :-))

          @++
          bob
          1. Modérateur
            J'aurais plutôt nommé l'utilisateur nouser au lieu de nobody, pour garder une rassemblence avec nogroup
            nouser
            nogroup

            Mais respectons le choix faite par les développeurs :-))
            1. Modérateur
              C'est normal puisque le group dont fait partie nobody s'appelle nogroup

              nogroup:x:65534:

              tape la commande
              lami20j@debian:~$ id nobody
              uid=65534(nobody) gid=65534(nogroup) groupes=65534(nogroup)

              1. Tu as raison !

                En fait il fallait écrire dans httpd.conf :
                User nobody
                Group nogroup

                et non pas :
                User nobody
                Group nobody

                Quel imbécile je fais ...............parfois ! -))

                Encore un grand merci à toi lami20j

                bob

                @suivre .....
            2. Modérateur
              Fait un signe si ça coince :-))
              1. En fait je coince un peu !

                J'ai voulu rajouter le user nobody :
                [root@localhost etc]# useradd nobody
                useradd : l'utilisateur nobody existe
                [root@localhost etc]# more group
                root:x:0:
                bin:x:1:
                daemon:x:2:messagebus,haldaemon
                sys:x:3:
                adm:x:4:
                tty:x:5:ups
                disk:x:6:
                lp:x:7:
                mem:x:8:
                kmem:x:9:
                wheel:x:10:
                mail:x:12:
                news:x:13:
                uucp:x:14:
                man:x:15:
                floppy:x:19:
                games:x:20:
                tape:x:21:
                cdrom:x:22:
                utmp:x:24:
                usb:x:43:saned,ups
                cdwriter:x:80:saned
                audio:x:81:
                video:x:82:
                users:x:100:
                nogroup:x:65534:
                vcsa:x:69:
                rpm:x:70:
                xgrp:x:101:xfs,gdm
                ntools:x:102:
                ctools:x:103:
                messagebus:x:71:
                avahi:x:72:
                haldaemon:x:73:
                xfs:x:74:
                lpadmin:x:104:
                gdm:x:75:
                saned:x:76:
                ups:x:77:ups
                ntp:x:78:
                slocate:x:105:
                toto:x:500:
                zozo:x:501:
                mysql:x:79:
                [root@localhost etc]#

                Or je ne vois pas nobody dans la liste !

                Je comprends plus rien !

                bob
            3. Modérateur
              Voilà ce que j'ai dans mon httpd.conf

               User webuser
               Group webgroup


              et dans /etc/passwd et /etc/group
              debian:/home/lami20j# grep web /etc/{passwd,group}
              /etc/passwd:webuser:x:50005:50005::/home/webuser:/bin/false
              /etc/group:webgroup:x:50005:
              
              et le daemon httpd
              lami20j@debian:~$ ps aux | grep httpd
              root      3150  0.0  0.2  14248   564 ?        Ss   09:49   0:00 /usr/local/httpd/bin/httpd -k start
              webuser   3157  0.0  0.3  19152   800 ?        S    09:49   0:00 /usr/local/httpd/bin/httpd -k start
              webuser   3158  0.0  0.3  19152   800 ?        S    09:49   0:01 /usr/local/httpd/bin/httpd -k start
              webuser   3159  0.0  0.3  19036   796 ?        S    09:49   0:00 /usr/local/httpd/bin/httpd -k start
              webuser   3160  0.0  0.3  19020   796 ?        S    09:49   0:00 /usr/local/httpd/bin/httpd -k start
              webuser   3161  0.0  0.3  18728   820 ?        S    09:49   0:01 /usr/local/httpd/bin/httpd -k start
              webuser   9547  0.0  0.3  18420   796 ?        S    10:28   0:00 /usr/local/httpd/bin/httpd -k start
              webuser   9551  0.0  0.3  19104   800 ?        S    10:28   0:00 /usr/local/httpd/bin/httpd -k start
              
              1. Merci encore à toi lami20j,

                Je vais m'inspirer de ton modèle ! Je pense pouvoir m'en sortir !
                Merci encore !

                bob
            4. Modérateur
              Salut,

              kill -9 7353
              pour arrêter httpd

              httpd: bad group name nobody

              regarde dans /etc/group pour voir si tu as ce groupe
              tape cette commande
              grep nobody /etc/group || echo "*** group nobody n'existe pas! ***"

              1. Salut et merci pour ta réponse !

                Voci la réponse à ta commande :
                [root@localhost Desktop]# grep nobody /etc/group || echo "*** group nobody n'existe pas! ***"
                *** group nobody n'existe pas! ***

                Je m'en doutais un petit peu ! Je suppose qu'il y a moyen de régler ceci en créant le user et le group nobody ? Sais tu; stp, comment s'y prendre ?

                Merci

                bob