Configuration Apache

Résolu/Fermé
Utilisateur anonyme - 22 mars 2008 à 13:33
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 - 8 sept. 2008 à 19:02
Bonjour,

Voila alors je me lance dans linux :) je développe des application web et je souhaite installé en local chez moi un poste linux avec apache/php/mysql pour me faire un serveur de teste.

J'ai instalé kubuntu et configuré ma connection le tout impecable :)
je suis super satisfait de l'OS.

J'ai installé apache et tout ce qu'il me faut et j'ai mis un fichier index.php avec juste un echo"index";
dans /var/www.

maintenant mon problème (ben oui il en faut un :)) lorsque je tape http://MonIp dans firefox il me propose de telechargé mon fichier index.php au lieu de l'affiché ...

Quelqu'un aurait il une idée ? :)

Merci pour votre aide!
A voir également:

41 réponses

Utilisateur anonyme
22 mars 2008 à 16:05
valentin@linux:/$ sudo aptitude reinstall apache2 libapache2-mod-php5 mysql-server-5.0 php5-mysql
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Lecture de l'information d'état étendu
Initialisation de l'état des paquets... Fait
Écriture de l'information d'état étendu... Fait
Construction de la base de données des étiquettes... Fait
Les paquets suivants ont été conservés automatiquement :
  linux-restricted-modules-common
Les paquets suivants ont été conservés :
  adept adept-batch adept-common adept-installer adept-manager adept-notifier adept-updater akregator avahi-autoipd avahi-daemon bind9-host cupsys cupsys-bsd cupsys-client
  cupsys-common dnsutils e2fslibs e2fsprogs findutils foo2zjs ghostscript ghostscript-x gtk-qt-engine hwdb-client-common hwdb-client-kde kaddressbook karm kate kcontrol
  kdebase-bin kdebase-data kdebase-kio-plugins kdelibs-data kdelibs4c2a kdepasswd kdepim-kio-plugins kdepim-kresources kdepim-wizards kdeprint kdesktop kdesudo kdm kfind
  khelpcenter kicker klipper kmail kmailcvt kmenuedit knotes konqueror konqueror-nsplugins konsole kontact korganizer ksmserver ksplash ksysguard ksysguardd kwin
  language-pack-en language-pack-en-base language-pack-kde-en language-pack-kde-en-base libavahi-client3 libavahi-common-data libavahi-common3 libavahi-compat-libdnssd1
  libavahi-core5 libavahi-qt3-1 libbind9-30 libblkid1 libc6 libc6-i686 libcairo2 libcomerr2 libcupsimage2 libcupsys2 libdb4.4 libdns32 libflac++6 libflac8 libgs8 libisc32
  libisccc30 libisccfg30 libkcal2b libkdepim1a libkleopatra1 libkmime2 libkonq4 libkpimexchange1 libkpimidentities1 libkrb53 libksieve0 libktnef1 liblwres30 libmimelib1c2a
  libnm-util0 libpango1.0-0 libpango1.0-common libpcre3 libperl5.8 libpng12-0 libpoppler-qt2 libpoppler2 libpq5 libpulse0 libqt3-mt libqt4-core libqt4-gui libsmbclient
  libsnmp-base libsnmp10 libss2 libssl0.9.8 libuuid1 libvolume-id0 libxfont1 libxml2 linux-headers-2.6.22-14 linux-headers-2.6.22-14-generic linux-image-2.6.22-14-generic
  linux-restricted-modules-2.6.22-14-generic network-manager networkstatus openoffice.org-calc openoffice.org-common openoffice.org-core openoffice.org-draw
  openoffice.org-impress openoffice.org-java-common openoffice.org-kde openoffice.org-math openoffice.org-style-crystal openoffice.org-style-human openoffice.org-writer
  openssh-client openssl perl perl-base perl-modules perl-suid poppler-utils python-libxml2 python-qt4 python-qt4-dbus python-uno python2.5 python2.5-dev python2.5-minimal
  samba-common smbclient ttf-opensymbol tzdata udev unzip volumeid xserver-xorg-core xserver-xorg-video-intel
Les paquets suivants seront RÉINSTALLÉS :
  apache2 libapache2-mod-php5 mysql-server-5.0 php5-mysql
0 paquets mis à jour, 0 nouvellement installés, 4 réinstallés, 0 à enlever et 161 non mis à jour.
Il est nécessaire de télécharger 0o/29,4Mo d'archives. Après dépaquetage, 0o seront utilisés.
Écriture de l'information d'état étendu... Fait
Préconfiguration des paquets...
(Lecture de la base de données... 94257 fichiers et répertoires déjà installés.)
Préparation du remplacement de mysql-server-5.0 5.0.45-1ubuntu3.3 (en utilisant .../mysql-server-5.0_5.0.45-1ubuntu3.3_i386.deb) ...
 * Stopping MySQL database server mysqld                                                                                                                                    [ OK ]
 * Stopping MySQL database server mysqld                                                                                                                                    [ OK ]
Dépaquetage de la mise à jour de mysql-server-5.0 ...
Préparation du remplacement de apache2 2.2.4-3ubuntu0.1 (en utilisant .../apache2_2.2.4-3ubuntu0.1_all.deb) ...
Dépaquetage de la mise à jour de apache2 ...
Préparation du remplacement de libapache2-mod-php5 5.2.3-1ubuntu6.3 (en utilisant .../libapache2-mod-php5_5.2.3-1ubuntu6.3_i386.deb) ...
Dépaquetage de la mise à jour de libapache2-mod-php5 ...
Préparation du remplacement de php5-mysql 5.2.3-1ubuntu6.3 (en utilisant .../php5-mysql_5.2.3-1ubuntu6.3_i386.deb) ...
Dépaquetage de la mise à jour de php5-mysql ...
Paramétrage de mysql-server-5.0 (5.0.45-1ubuntu3.3) ...
 * Stopping MySQL database server mysqld                                                                                                                                    [ OK ]
 * Starting MySQL database server mysqld                                                                                                                                    [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Paramétrage de apache2 (2.2.4-3ubuntu0.1) ...
Paramétrage de libapache2-mod-php5 (5.2.3-1ubuntu6.3) ...

Paramétrage de php5-mysql (5.2.3-1ubuntu6.3) ...

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Lecture de l'information d'état étendu
Initialisation de l'état des paquets... Fait
Construction de la base de données des étiquettes... Fait


voila
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:08
affiche maintenant
sudo apache2 -M
0
Utilisateur anonyme
22 mars 2008 à 16:09
valentin@linux:/$ sudo apache2 -M
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 status_module (shared)
Syntax OK


toujours pas apparement ...
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:10
affiche aussi
rgrep Include /etc/apache2/
ls -l /etc/apache2/mods-enabled/

0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Utilisateur anonyme
22 mars 2008 à 16:11
valentin@linux:/$ rgrep Include /etc/apache2/
/etc/apache2/apache2.conf~:# Include module configuration:
/etc/apache2/apache2.conf~:Include /etc/apache2/mods-enabled/*.load
/etc/apache2/apache2.conf~:Include /etc/apache2/mods-enabled/*.conf
/etc/apache2/apache2.conf~:# Include all the user configurations:
/etc/apache2/apache2.conf~:Include /etc/apache2/httpd.conf
/etc/apache2/apache2.conf~:# Include ports listing
/etc/apache2/apache2.conf~:Include /etc/apache2/ports.conf
/etc/apache2/apache2.conf~:#        Options IncludesNoExec
/etc/apache2/apache2.conf~:#        AddOutputFilter Includes html
/etc/apache2/apache2.conf~:# Include of directories ignores editors' and dpkg's backup files,
/etc/apache2/apache2.conf~:# Include generic snippets of statements
/etc/apache2/apache2.conf~:Include /etc/apache2/conf.d/
/etc/apache2/apache2.conf~:# Include the virtual host configurations:
/etc/apache2/apache2.conf~:Include /etc/apache2/sites-enabled/
/etc/apache2/apache2.conf:# Include module configuration:
/etc/apache2/apache2.conf:Include /etc/apache2/mods-enabled/*.load
/etc/apache2/apache2.conf:Include /etc/apache2/mods-enabled/*.conf
/etc/apache2/apache2.conf:# Include all the user configurations:
/etc/apache2/apache2.conf:Include /etc/apache2/httpd.conf
/etc/apache2/apache2.conf:# Include ports listing
/etc/apache2/apache2.conf:Include /etc/apache2/ports.conf
/etc/apache2/apache2.conf:#        Options IncludesNoExec
/etc/apache2/apache2.conf:#        AddOutputFilter Includes html
/etc/apache2/apache2.conf:# Include of directories ignores editors' and dpkg's backup files,
/etc/apache2/apache2.conf:# Include generic snippets of statements
/etc/apache2/apache2.conf:Include /etc/apache2/conf.d/
/etc/apache2/apache2.conf:# Include the virtual host configurations:
/etc/apache2/apache2.conf:Include /etc/apache2/sites-enabled/
/etc/apache2/mods-enabled/mime.conf:# (You will also need to add "Includes" to the "Options" directive.)
/etc/apache2/mods-available/userdir.conf:                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
/etc/apache2/mods-available/mime.conf:# (You will also need to add "Includes" to the "Options" directive.)




valentin@linux:/$ ls -l /etc/apache2/mods-enabled/
total 0
lrwxrwxrwx 1 root root 28 2008-03-21 23:52 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root 28 2008-03-21 23:52 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root 33 2008-03-21 23:52 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root 33 2008-03-21 23:52 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root 36 2008-03-21 23:52 authz_default.load -> ../mods-available/authz_default.load
lrwxrwxrwx 1 root root 38 2008-03-21 23:52 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root 33 2008-03-21 23:52 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root 33 2008-03-21 23:52 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 2008-03-21 23:52 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 2008-03-21 23:52 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root 26 2008-03-22 12:07 cgi.load -> ../mods-available/cgi.load
lrwxrwxrwx 1 root root 26 2008-03-21 23:52 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root 26 2008-03-21 23:52 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root 26 2008-03-21 23:52 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root 27 2008-03-21 23:52 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root 27 2008-03-21 23:52 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root 34 2008-03-21 23:52 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 2008-03-21 23:52 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root 31 2008-03-21 23:52 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 2008-03-21 23:52 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root 29 2008-03-21 23:52 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root 29 2008-03-21 23:52 status.load -> ../mods-available/status.load


Voila :)
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:18
essaie comme ça
sudo ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
sudo ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
sudo /etc/init.d/apache2 restart
0
Utilisateur anonyme
22 mars 2008 à 16:22
valentin@linux:/$ sudo ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
valentin@linux:/$ sudo ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
valentin@linux:/$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2 


toujours pareil ...

Merci de ton aide :)
0
Utilisateur anonyme
22 mars 2008 à 16:28
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:38
et
 ls -l /etc/apache2/mods-enabled/ | grep php 
te donne quoi maintenant?
0
Utilisateur anonyme
22 mars 2008 à 16:39
ça donne ça!

valentin@linux:/$ ls -l /etc/apache2/mods-enabled/ | grep php
lrwxrwxrwx 1 root root 37 2008-03-22 16:19 php5.conf -> /etc/apache2/mods-available/php5.conf
lrwxrwxrwx 1 root root 37 2008-03-22 16:19 php5.load -> /etc/apache2/mods-available/php5.load



:)
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:42
affiche aussi
rgrep php /etc/apache2/
et
sudo apache2 -M
ne te donne toujours pas le moduel php ?
0
Utilisateur anonyme
22 mars 2008 à 16:44
valentin@linux:/$ rgrep php /etc/apache2/
/etc/apache2/mods-enabled/php5.load:LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
/etc/apache2/mods-enabled/php5.conf:<IfModule mod_php5.c>
/etc/apache2/mods-enabled/php5.conf:  AddType application/x-httpd-php .php .phtml .php3
/etc/apache2/mods-enabled/php5.conf:  AddType application/x-httpd-php-source .phps
/etc/apache2/mods-enabled/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
/etc/apache2/mods-available/php5.load:LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
/etc/apache2/mods-available/php5.conf:<IfModule mod_php5.c>
/etc/apache2/mods-available/php5.conf:  AddType application/x-httpd-php .php .phtml .php3
/etc/apache2/mods-available/php5.conf:  AddType application/x-httpd-php-source .phps
/etc/apache2/mods-available/dir.conf:          DirectoryIndex index.html index.cgi index.pl index.php index.xhtml

valentin@linux:/$ sudo apache2 -M
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 setenvif_module (shared)
 status_module (shared)
Syntax OK



si ça y'ai pour le module!
0
Utilisateur anonyme
22 mars 2008 à 16:45
Génial tu as resolu mon probleme!

un grand merci

Pourrais tu me faire un ptit recap vite fais juste pour que je comprenne bien ce qui empechait le fonctionnement ?

merci!
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 16:48
En fait il te manquait (je ne sais pas pour quelle raison) les liens vers les fichiers php5.load et php5.conf http://www.commentcamarche.net/forum/affich 5570403 configuration apache?page=2#30

Bonne continuation ;-)
0
Utilisateur anonyme
22 mars 2008 à 16:53
Alors je sais pas dis moi si je me gourre mais j'ai installé phpmyadmin et je n'y ai pas accès ...

http://192.168.1.105/phpmyadmin donne erreur 404

peut etre est ce des liens manquant aussi?
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 17:04
affiche
ls -l /var/www
ls -ld /usr/share/phpmyadmin
0
Utilisateur anonyme
22 mars 2008 à 17:17
valentin@linux:/etc/samba$ ls -l /var/www
total 12
drwxr-xr-x 2 root root 4096 2008-03-22 12:03 apache2-default
-rw-r--r-- 1 root root   38 2008-03-22 12:46 index.php
-rw-r--r-- 1 root root   20 2008-03-21 23:54 index.php~


valentin@linux:/etc/samba$ ls -ld /usr/share/phpmyadmin
drwxr-xr-x 9 root root 4096 2008-03-22 16:51 /usr/share/phpmyadmin


voila :)
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
22 mars 2008 à 17:26
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
0
Utilisateur anonyme
22 mars 2008 à 17:30
En plein dans le mille!

Merci beaucoup pour le temps que tu m'as consacré!
++
0
Il aurait quand même été plus rapide et simple de lancer la commande

a2enmod php5

et puis

/etc/init.d/apache2 restart

au lieu de réinstaller 20 fois le packet ;) ou de créer les liens à la main
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 569
8 sept. 2008 à 19:02
Salut,

Il aurait quand même été plus rapide et simple de lancer la commande
toute à fait, sauf que dans le mois de mars je ne connaissais pas encore cette commande ;-)

et franchement, je n'ai pas envie de déterrer tous mes messages pour poster la solution la plus simple et la plus courte ;-)

merci pour l'alternative, elle servira au prochain cas ;-))

0