[Fedora] Mise en service serveur web Apache 2

Bjr,
Je voudrais installer un site sur le serveur SMILEY Qui tourne sur une distribution Fedora Core 3 avec Apache 2 Actuellement fonctionnelle.
Je probleme rencontre apres plusieurs essaie est une fois le compte user crée ‘evian’ avec mots de passe… il m’est pas spossible de visualiser le site evian.


http://123.45.11.120/evian
http://123.45.11.120/evian/
http://123.45.11.120/~evian/

j’ai essayer 2 possibilité de placer le dossier racine du site evian
Dans :


/var/www/evian 
/var/www/http/evian , et j'obtiens le meme type de pbs. 

Forbidden

You don't have permission to access /evian/ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.52 (Fedora) Server at 123.45.11.120 Port 80

J’ai verifier un million de fois les permissions… 666 pour les fichier, et 777 pour les directory.voir même les modifiers.

le site se situe dans l’arborescence du system

[root@localhost www]# cd /home
[root@localhost home]# ls
evian
[root@localhost home]# cd evian/
[root@localhost evian]# ls
public_html
[root@localhost evian]# cd public_html/
[root@localhost public_html]# ls
contact  images  index.html  info.txt  maquette.htm

Au niveau de apache / les racourcirs …

[root@localhost www]# ls -l
total 52
drwxr-xr-x   2 root      root 4096 oct 15  2004 cgi-bin
drwxr-xr-x   3 root      root 4096 avr 21 18:58 error
drwxr-xr-x   3 root      root 4096 mai 22 00:55 html
drwxr-xr-x   3 root      root 4096 avr 21 18:58 icons
drwxr-xr-x  13 root      root 4096 avr 21 18:58 manual
lrwxrwxrwx   1 root      root   25 mai 25 11:33 evian -> /home/evian/public_html
drwxr-xr-x   2 webalizer root 4096 mai  1 04:02 usage

[root@localhost www]# cd html
[root@localhost html]# ls -l
total 28
drwxr-xr-x  2 root root 4096 mai  1 13:45 img
-rw-r--r--  1 root root  461 mai  1 13:57 index.php
lrwxrwxrwx  1 root root   25 mai 22 00:55 evian -> /home/evian/public_html
-rw-r--r--  1 root root  300 avr 28 13:55 phpinfo.php_old

je suis larguer… qqu a une idee ??

et du coté de la configuration d’apache ?

Je vais pas poster le fichier confi mais faire juste un lien.
Fichier Httpd.conf

Pourquoi un lien symbolique ?
Un mount -bind ne serait-il pas mieux ?

La racine de ton apache est /var/www/html
C’est donc dans ce répertoire qu’il faut placer les fichiers.

Ensuite il faut que les permissions soient 711 (au moins) pour le répertoire /home/evian et 755 (au moins) pour /home/evian/public_html

Regarde aussi dans le fichier de log d’erreur d’Apache (/var/log/httpd/error_log sur ma Mandrake), il y a souvent plus de détails concernant ce genre de problème.

Sinon en passant, es-tu sûr d’avoir besoin d’activer tous les modules d’Apache ?

Bonjour, loader.

Suite a vos messages a tous . je me pose une question . le dossier :

lrwxrwxrwx  1 root root   25 mai 22 00:55 necstar -> /home/evian/public_html

peux rester dans le group root?.

Oui, je suis d’accord avec toi… je regarderais plus en details pour desactivé les modules qui ne sont pas nécessaire.

Si j’ai fais des liens Symbolique c’etait pour une premier resolution URL .
que l’on tape comme url http://234.65.77.222/evian[/url] or [url=http://234.65.77.222/~evian]http://234.65.77.222/~evian

On arrive sur le site… ça évite de taper l’acollade.

Mount -bind je ne connais pas cette command elle permetde faire quoi?.

:wacko: Je suis totale perdu…
Je vais reprendre mon problem depuis le début pour essayer determiner ce qui ne va pas…
:blink:

J’ai installé un serveur web avec la distribution Fedora 3… Avec plusieurs comptes User, qui correspond a plusieurs sites web…

A premiere vue le serveur tourne parfaite apres installation…
Page d’accueil Fedora ok .
/var/www/html

maintenant concernant les sites internet il me retourne une erreur 403


Forbidden

You don't have permission to access /~toto on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.52 (Fedora) Server at 158.55.45.35 Port 80

Suite a ça je vous cite les procédures que j’ai fais pour corriger. Ainsi rendre fonctionnelle le site du compte /home/evian/public_html/

Modification du chmod :

chmod a+x /home
chmod ao+x /home/evian
chmod ao+x /home/evian/public_html

Modification du fichier httpd.conf en ajoutant :


#Alias /home/evian/public_html/
<Directory /home/evian/public_html>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Modification de mon fichier SELinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

Reboot test de connection, toujours le même probleme…

log acces

82.120.177.122 - - [05/Jun/2005:04:02:43 +0200] "GET /favicon.ico HTTP/1.1" 404 288 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
82.120.177.122 - - [05/Jun/2005:04:02:43 +0200] "GET /favicon.ico HTTP/1.1" 404 288 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
82.120.177.122 - - [05/Jun/2005:04:02:53 +0200] "GET /~evian HTTP/1.1" 403 408 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
82.120.177.122 - - [05/Jun/2005:04:02:53 +0200] "GET /favicon.ico HTTP/1.1" 404 288 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0"
~

log error

[Sun Jun 05 04:02:06 2005] [notice] Digest: generating secret for digest authentication ...
[Sun Jun 05 04:02:06 2005] [notice] Digest: done
[Sun Jun 05 04:02:06 2005] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Sun Jun 05 04:02:06 2005] [notice] LDAP: SSL support unavailable
[Sun Jun 05 04:02:06 2005] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 05 04:02:07 2005] [notice] Apache/2.0.52 (Fedora) configured -- resuming normal operations
[Sun Jun 05 04:02:43 2005] [error] [client 82.120.177.122] File does not exist: /var/www/html/favicon.ico
[Sun Jun 05 04:02:43 2005] [error] [client 82.120.177.122] File does not exist: /var/www/html/favicon.ico
[Sun Jun 05 04:02:53 2005] [error] [client 82.120.177.122] (13)Permission denied: access to /~evian denied
[Sun Jun 05 04:02:53 2005] [error] [client 82.120.177.122] File does not exist: /var/www/html/favicon.ico

A se niveau là je suis perdu. :mellow:


[root@localhost ~]# cd /var/www/
[root@localhost www]# ls
cgi-bin  error  html  icons  manual  usage
[root@localhost www]# cd html/
[root@localhost html]# ls -l
total 24
drwxr-xr-x  2 root root 4096 mai  1 13:45 img
-rw-r--r--  1 root root  471 jun  3 14:06 index.php
-rw-r--r--  1 root root  300 avr 28 13:55 phpinfo.php

honnement je ne vois pas ou est mon probleme…

T’as créé un fichier “index.html” ? Parce que par défaut, tu n’as sans doute pas le droit de lister le contenu des répertoires. Je suis sûr que tout fonctionne impec mais que l’erreur 403 est dûe à ça.

oui, effectivement c’est une chose que j’ai fais .
j’ai bien un fichier index.html . avec toujours le même problem. -_-

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

Apres lecture de plusieurs sites internet concernant Selinux sous fedora… je ne devrais pas desactivé celui-ci…
Ce que j’ai pu voir sur certain FAQ pour certaine personne ils ont pu resoudre ce probleme :huh: ERROR 403 en desactivant celui-ci … Mais Niveau sécurité ce n’est pas ça… Mais pour ma par je ne pense pas que le problem soit réellement resolvé …
:wacko:
je voudrais comprendre tout ça… si vous pouvez m’apporter des réponses. :rolleyes:

J’ai pu afficher les pages des sites en desactivant selinux… et un reboot serveur…
il y a une chose que je ne comprends pas pour desactivé selinux??? :huh:

Pose toi aussila question de savoir si t’es sûr d’avoir besoin de SELinux (tu bosse pour la DGSE ou la DGA ?)

Oui, je sais Mais c’est plus fort que moi. j’ai besoins de savoir…
Même plusieurs liens pour m’expliquer Selinux…
:jap:

Le plus desagreable c’est que sa semble fonctionner pour certain…