Apache 2 : Problèmes

Bonjour à tous, voilà j’ai un problème avec apache2. Je n’arrive pas a l’utiliser.
Cette discution ce continue d’une autre …

Voilà quelques renseignements :

/etc/apache# apache2
apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/mod_python.load: Cannot load /usr/lib/apache2/modules/mod_python.so into server: /usr/lib/apache2/modules/mod_python.so: cannot open shared object file: No such file or directory
$ dpkg -l apache2
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé
|/ Err?=(aucune)/H=à garder/besoin Réinstallation/X=les deux (État,Err: majuscule=mauvais)
||/ Nom            Version        Description
+++-==============-==============-============================================
ii  apache2        2.2.3-4+etch4  Next generation, scalable, extendable web se
$ dpkg -l apache2
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé
|/ Err?=(aucune)/H=à garder/besoin Réinstallation/X=les deux (État,Err: majuscule=mauvais)
||/ Nom            Version        Description
+++-==============-==============-============================================
ii  apache2        2.2.3-4+etch4  Next generation, scalable, extendable web se
serveur@YukServ:/etc/apache$ ps aux | grep apache
root      4413  0.0  1.1   4756  2120 ?        Ss   Apr25   0:00 /usr/sbin/apache
www-data 12681  0.0  0.6   4756  1316 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12686  0.0  0.7   4756  1368 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12687  0.0  0.6   4756  1316 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12688  0.0  0.6   4756  1316 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12689  0.0  0.6   4756  1316 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12690  0.0  0.7   4756  1368 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12691  0.0  0.7   4756  1376 ?        S    21:15   0:00 /usr/sbin/apache
www-data 12709  0.0  0.7   4756  1368 ?        S    21:26   0:00 /usr/sbin/apache
serveur  12747  0.0  0.3   2880   756 pts/1    R+   21:41   0:00 grep apache

Up :’(

le message d’erreur est assez explicite, dans ton fichier apache2.conf tu demandes de charger le module pour python alors que vraissemblablement ce dernier n’est pas installé.

Fais un:
$ locate mod_python.so
ou bien
$ dpkg -l libapache2-mod-python

s’il ne trouve rien:
$ sudo aptitude install libapache2-mod-python

Les deux premieres commandes ne donnèrent rien, j’ai réalisé la commande apt-get install.
L’installation s’est accomplie avec succès.
Je dois faire quoi maintenant ?

Tu as relancé apache2? Tourne-t’il?

$ ps aux | grep apache

Je redémarre :

YukServ:~# /etc/init.d/apache2 reload
* Not starting apache2 - edit /etc/default/apache2 and change NO_START to be 0.

Modification de /etc/default/apache2 :
Je change NO_START=1 en NO_START=0
Je reboot.

apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/perl.load: Cannot load /usr/lib/apache2/modules/mod_perl.so into server: /usr/lib/apache2/modules/mod_perl.so: cannot open shared object file: No such file or directory
 failed!

Je pense que je dois changer mon apache2.conf … Enfin je ne sais pas … Ou, je le ré-installe ?

$ ps aux | grep apache root 4413 0.0 1.1 4756 2120 ? Ss Apr25 0:00 /usr/sbin/apache www-data 12681 0.0 0.6 4756 1336 ? S Apr27 0:00 /usr/sbin/apache www-data 12686 0.0 0.7 4756 1368 ? S Apr27 0:00 /usr/sbin/apache www-data 12687 0.0 0.6 4756 1316 ? S Apr27 0:00 /usr/sbin/apache www-data 12690 0.0 0.7 4756 1376 ? S Apr27 0:00 /usr/sbin/apache www-data 12691 0.0 0.7 4756 1376 ? S Apr27 0:00 /usr/sbin/apache www-data 12709 0.0 0.7 4756 1376 ? S Apr27 0:00 /usr/sbin/apache www-data 13432 0.0 0.6 4756 1304 ? S 11:15 0:00 /usr/sbin/apache www-data 13854 0.0 0.6 4756 1296 ? S 14:10 0:00 /usr/sbin/apache www-data 13855 0.0 0.6 4756 1296 ? S 14:10 0:00 /usr/sbin/apache www-data 13856 0.0 0.6 4756 1300 ? S 14:10 0:00 /usr/sbin/apache serveur 14038 0.0 0.3 2876 752 pts/0 R+ 17:43 0:00 grep apache

Il te manque le mod_perl, cette fois. Même punition que pour le mod_python (libapache2-mod-perl2). Tu devrais te débrouiller maintenant.

Tu risques d’avoir de nouveaux messages d’erreur pour les autres modules. Donne-nous le résulat de
$ ls -l /etc/apache2/mods-enabled
et de
$ ls -l /etc/apache2/mods-available

Ensuite arrête le serveur apache 1
$ sudo /etc/init.d/apache stop

Démarre apache2
$ sudo /etc/init.d/apache2 start

Si tu n’as pas de message d’erreur, essaye une page html pour voir. Si ça ne marche pas, vérifie si apache2 tourne avec un ps comme ci-dessus.

Je te remercie encore de ta patience avec mon probleme :slightly_smiling:.

Alors, j’install les packets necessaires …

Les commandes :

$ ls -l /etc/apache2/mods-enabled
total 8
lrwxrwxrwx 1 root root 28 1980-02-05 21:06 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 1980-02-05 21:06 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 1980-02-05 21:06 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 36 1980-02-05 21:06 authz_default.load -> ../mods-available/authz_default.load
lrwxrwxrwx 1 root root 38 1980-02-05 21:06 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 1980-02-05 21:06 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 1980-02-05 21:06 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 1980-02-05 21:06 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 26 1980-02-05 21:06 cgi.load -> ../mods-available/cgi.load
lrwxrwxrwx 1 root root 26 1980-02-05 21:06 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 1980-02-05 21:06 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 1980-02-05 21:06 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 27 1980-02-05 21:06 mime.load -> ../mods-available/mime.load
-rw-r--r-- 1 root root 64 2008-04-25 19:39 mod_python.load
lrwxrwxrwx 1 root root 34 1980-02-05 21:06 negotiation.load -> ../mods-available/negotiation.load
-rw-r--r-- 1 root root 60 2008-04-25 19:39 perl.load
lrwxrwxrwx 1 root root 27 1980-02-05 21:06 php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root 27 1980-02-05 21:06 php5.load -> ../mods-available/php5.load
lrwxrwxrwx 1 root root 31 1980-02-05 21:06 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 1980-02-05 21:06 status.load -> ../mods-available/status.load
$ ls -l /etc/apache2/mods-available
total 320
-rw-r--r-- 1 root root   66 2008-04-25 19:38 actions.load
-rw-r--r-- 1 root root   62 2008-04-25 19:39 alias.load
-rw-r--r-- 1 root root   60 2008-04-25 19:38 asis.load
-rw-r--r-- 1 root root   72 2008-04-25 19:39 auth_basic.load
-rw-r--r-- 1 root root   74 2008-04-25 19:38 auth_digest.load
-rw-r--r-- 1 root root   74 2008-04-25 19:38 authn_alias.load
-rw-r--r-- 1 root root   72 2008-04-25 19:38 authn_anon.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 authn_dbd.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 authn_dbm.load
-rw-r--r-- 1 root root   78 2008-04-25 19:38 authn_default.load
-rw-r--r-- 1 root root   72 2008-04-25 19:39 authn_file.load
-rw-r--r-- 1 root root   90 2008-04-25 19:38 authnz_ldap.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 authz_dbm.load
-rw-r--r-- 1 root root   78 2008-04-25 19:39 authz_default.load
-rw-r--r-- 1 root root   82 2008-04-25 19:39 authz_groupfile.load
-rw-r--r-- 1 root root   72 2008-04-25 19:39 authz_host.load
-rw-r--r-- 1 root root   74 2008-04-25 19:38 authz_owner.load
-rw-r--r-- 1 root root   72 2008-04-25 19:39 authz_user.load
-rw-r--r-- 1 root root   70 2008-04-25 19:39 autoindex.load
-rw-r--r-- 1 root root   62 2008-04-25 19:38 cache.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 cern_meta.load
-rw-r--r-- 1 root root   68 2008-04-25 19:38 cgid.conf
-rw-r--r-- 1 root root   60 2008-04-25 19:38 cgid.load
-rw-r--r-- 1 root root   58 2008-04-25 19:39 cgi.load
-rw-r--r-- 1 root root   76 2008-04-25 19:38 charset_lite.load
-rw-r--r-- 1 root root   36 2008-04-25 19:38 dav_fs.conf
-rw-r--r-- 1 root root   79 2008-04-25 19:38 dav_fs.load
-rw-r--r-- 1 root root   58 2008-04-25 19:38 dav.load
-rw-r--r-- 1 root root   68 2008-04-25 19:38 dav_lock.load
-rw-r--r-- 1 root root   58 2008-04-25 19:38 dbd.load
-rw-r--r-- 1 root root  107 2008-04-25 19:38 deflate.conf
-rw-r--r-- 1 root root   66 2008-04-25 19:38 deflate.load
-rw-r--r-- 1 root root  112 2008-04-25 19:39 dir.conf
-rw-r--r-- 1 root root   58 2008-04-25 19:39 dir.load
-rw-r--r-- 1 root root  554 2008-04-25 19:38 disk_cache.conf
-rw-r--r-- 1 root root   89 2008-04-25 19:38 disk_cache.load
-rw-r--r-- 1 root root   64 2008-04-25 19:38 dump_io.load
-rw-r--r-- 1 root root   58 2008-04-25 19:39 env.load
-rw-r--r-- 1 root root   66 2008-04-25 19:38 expires.load
-rw-r--r-- 1 root root   72 2008-04-25 19:38 ext_filter.load
-rw-r--r-- 1 root root   89 2008-04-25 19:38 file_cache.load
-rw-r--r-- 1 root root   64 2008-04-25 19:38 filter.load
-rw-r--r-- 1 root root   66 2008-04-25 19:38 headers.load
-rw-r--r-- 1 root root   62 2008-04-25 19:38 ident.load
-rw-r--r-- 1 root root   68 2008-04-25 19:38 imagemap.load
-rw-r--r-- 1 root root   66 2008-04-25 19:38 include.load
-rw-r--r-- 1 root root   60 2008-04-25 19:38 info.load
-rw-r--r-- 1 root root   60 2008-04-25 19:38 ldap.load
-rw-r--r-- 1 root root   76 2008-04-25 19:38 log_forensic.load
-rw-r--r-- 1 root root  185 2008-04-25 19:38 mem_cache.conf
-rw-r--r-- 1 root root   87 2008-04-25 19:38 mem_cache.load
-rw-r--r-- 1 root root   60 2008-04-25 19:39 mime.load
-rw-r--r-- 1 root root   89 2008-04-25 19:38 mime_magic.conf
-rw-r--r-- 1 root root   72 2008-04-25 19:38 mime_magic.load
-rw-r--r-- 1 root root   64 2008-04-25 19:38 mod_python.load
-rw-r--r-- 1 root root   74 2008-04-25 19:39 negotiation.load
-rw-r--r-- 1 root root   60 2008-04-25 19:38 perl.load
-rw-r--r-- 1 root root  133 2008-04-25 19:39 php5.conf
-rw-r--r-- 1 root root   59 2008-04-25 19:39 php5.load
-rw-r--r-- 1 root root   87 2008-04-25 19:38 proxy_ajp.load
-rw-r--r-- 1 root root  103 2008-04-25 19:38 proxy_balancer.load
-rw-r--r-- 1 root root  681 2008-04-25 19:38 proxy.conf
-rw-r--r-- 1 root root   95 2008-04-25 19:38 proxy_connect.load
-rw-r--r-- 1 root root   87 2008-04-25 19:38 proxy_ftp.load
-rw-r--r-- 1 root root   89 2008-04-25 19:38 proxy_http.load
-rw-r--r-- 1 root root   62 2008-04-25 19:38 proxy.load
-rw-r--r-- 1 root root   66 2008-04-25 19:38 rewrite.load
-rw-r--r-- 1 root root   68 2008-04-25 19:39 setenvif.load
-rw-r--r-- 1 root root  298 2008-04-25 19:38 sick-hack-to-update-modules
-rw-r--r-- 1 root root   66 2008-04-25 19:38 speling.load
-rw-r--r-- 1 root root 1781 2008-04-25 19:38 ssl.conf
-rw-r--r-- 1 root root   58 2008-04-25 19:38 ssl.load
-rw-r--r-- 1 root root   64 2008-04-25 19:39 status.load
-rw-r--r-- 1 root root   64 2008-04-25 19:38 suexec.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 unique_id.load
-rw-r--r-- 1 root root  293 2008-04-25 19:38 userdir.conf
-rw-r--r-- 1 root root   66 2008-04-25 19:38 userdir.load
-rw-r--r-- 1 root root   70 2008-04-25 19:38 usertrack.load
-rw-r--r-- 1 root root   66 2008-04-25 19:38 version.load
-rw-r--r-- 1 root root   74 2008-04-25 19:38 vhost_alias.load

Serveur lancé en Apache2 ! Pour le lancé il m’a falut taper

$ /etc/init.d/apache2 start
install: ne peut modifier le propriétraire et/ou le groupe de `/var/lock/apache2': Opération non permise.

//ALORS JE L'AI DEMARRE EN ROOT LE TEMPS DE SAVOIR COMMENT DEMARRER EN WWW-DATA

# /etc/init.d/apache2 start
Starting web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.8 for ServerName
.

J’ai entendu dire qu’il ne fallait pas le boot en root ? Comment faisons nous en “www-data” ?

Dernier petit probleme : le serveur me passe directement sur yukserv.dnsalias.com/apache2-default/
Or, il n’y a pas de dossier apache2-default et je ne veux pas que ca redirige directement ici …
MERCI ENCORE :smiley:

[quote=“Yukiz”]$ /etc/init.d/apache2 start
install: ne peut modifier le propriétraire et/ou le groupe de `/var/lock/apache2’: Opération non permise.

//ALORS JE L’AI DEMARRE EN ROOT LE TEMPS DE SAVOIR COMMENT DEMARRER EN WWW-DATA

/etc/init.d/apache2 start

Starting web server (apache2)…apache2: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.8 for ServerName
.

J’ai entendu dire qu’il ne fallait pas le boot en root ? Comment faisons nous en “www-data” ?
[/quote]
Tu dois lancer le processus initial en root. Les processus fille seront automatiquement lancés par apache avec www-data comme UID.

[quote=“Yukiz”]Dernier petit probleme : le serveur me passe directement sur yukserv.dnsalias.com/apache2-default/
Or, il n’y a pas de dossier apache2-default et je ne veux pas que ca redirige directement ici …
MERCI ENCORE :smiley:[/quote]

Tu dois avoir une ligne dans /etc/apache2/default qui contient quelque-chose comme RedirectMatch ^/$ /apache2-default/. COmmente-la ou redirige la vers ta page index ou accueil: RedirectMatch ^/$ /index.php. N’oublie pas de faire un reload après modification. J’ai remarqué que tu confondais un peu reload (relire la config sans arrêter le serveur), restart (stop-start), start (si à l’arrêt) et stop pour… le stopper.

# ls /etc/apache2/
access.conf      conf.d/          httpd.conf       mods-available/  modules.conf     sites-available/ srm.conf
apache2.conf     envvars          mime.types       mods-enabled/    ports.conf       sites-enabled/

Je n’ai pas de fichier ‘default’ …
Et je ne trouve pas le bon :’(

/etc/apache2/sites-available/default

Niquel !
Je te remercie profondement, de plus mes pages PHP marchent !

J’en suis heureux … Merci encore Ripat !
Mais juste une question comme ca, quel est le fichier qui donne l’user et mot de psse de phpmyadmin. Car je le cherche mais je ne vois rien. Et il y a plus de 20 fichiers a trier …