- Télécharger
- Obtenir Fedora
- Toutes les méthodes de téléchargement
- Sous-projets
- Muffin
- Plateforme de blog
Dernière news : Fedora 19 (Schrödinger's Cat) alpha est sortie
Bonjour,
Je m'arrache les cheveux depuis quelques jours avec Apache et les hôtes virtuels.
J'ai configuré un hôte virtuel comme indiqué dans la documentation:
sites.conf
# Activation des hôtes virtuels
NameVirtualHost *:80
# Hôte virtuel par défaut
<VirtualHost *:80>
# home du site : URL = http://localhost/
ServerName localhost
# Dossier contenant les pages
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
AllowOverride FileInfo AuthConfig Limit
</Directory>
# jeu de caractères (UTF-8 par défaut)
AddDefaultCharset UTF-8)
# Activation des sites de quelques utilisateurs : http://localhost/~nomutilisateur
UserDir enabled mistral
UserDir public_html
<Directory /home/*/public_html>
AllowOverride all
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
# Activation de l'adresse : http://localhost/server-status
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Location>
# Activation de l'adresse : http://localhost/server-info
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Location>
</VirtualHost>
# Site
<VirtualHost *:80>
# home du site : URL = http://site/
ServerName site
# Dossier contenant les pages
DocumentRoot /home/mistral/public_html/site
<Directory /home/mistral/public_html/site>
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
AllowOverride FileInfo AuthConfig Limit
</Directory>
# jeu de caractères (UTF-8 par défaut)
AddDefaultCharset UTF-8)
</VirtualHost>hosts :
127.0.0.1 localhost site localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost site localhost.localdomain localhost6 localhost6.localdomain6J'ai placé une page de test dans le dossier "site".
Lorsque je suis connecté à un réseau sans fil/cablé, aucun soucis que ce soit pour "localhost" ou "site".
Lorsque je suis déconnecté, aucun soucis pour "localhost", en revanche, impossible d'afficher la page pour "site".
Un ping, et "site" répond sans broncher
[mistral@Verne ~]$ ping site
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.054 ms
64 bytes from localhost (127.0.0.1): icmp_req=2 ttl=64 time=0.057 ms
64 bytes from localhost (127.0.0.1): icmp_req=3 ttl=64 time=0.057 ms
^C
--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.054/0.056/0.057/0.001 ms Si quelqu'un a la moindre idée du pourquoi, je suis preneur! :)
Merci d'avance!
Mistral
PS : Le problème est présent sous FF et Chromium
Dernière modification par Mistral (24/04/2012 01:51:59)
## Mistral ##
Asus K52JT - Intel® Core™ i5 CPU M 480 @ 2.67GHz × 4
ATI Radeon HD 6370M 1Gb - 8Go DDR3 - HDD 640Go - Fedora 16 'Verne' :)
Hors ligne
Bonsoir,
N'ayant pas eu de réponse, je suppose que personne n'a d'idée?
J'ai remarqué une chose, sous Opera, je n'ai aucun problème d'accès lorsque je ne suis pas connecté...
Le soucis ne semble donc pas venir d'Apache ni du fichier hosts, mais d'un soucis de configuration de Firefox et de Chromium. J'ai cherché, mais je n'ai pas trouvé de solution dans la config...
Merci d'avance!
## Mistral ##
Asus K52JT - Intel® Core™ i5 CPU M 480 @ 2.67GHz × 4
ATI Radeon HD 6370M 1Gb - 8Go DDR3 - HDD 640Go - Fedora 16 'Verne' :)
Hors ligne
Bonjour,
Je m'arrache les cheveux depuis quelques jours avec Apache et les hôtes virtuels.J'ai configuré un hôte virtuel comme indiqué dans la documentation:
sites.conf
# Activation des hôtes virtuels NameVirtualHost *:80 # Hôte virtuel par défaut <VirtualHost *:80> # home du site : URL = http://localhost/ ServerName localhost # Dossier contenant les pages DocumentRoot /var/www/html <Directory /var/www/html/> Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec AllowOverride FileInfo AuthConfig Limit </Directory> # jeu de caractères (UTF-8 par défaut) AddDefaultCharset UTF-8) # Activation des sites de quelques utilisateurs : http://localhost/~nomutilisateur UserDir enabled mistral UserDir public_html <Directory /home/*/public_html> AllowOverride all Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec </Directory> # Activation de l'adresse : http://localhost/server-status <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 </Location> # Activation de l'adresse : http://localhost/server-info <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 </Location> </VirtualHost> # Site <VirtualHost *:80> # home du site : URL = http://site/ ServerName site # Dossier contenant les pages DocumentRoot /home/mistral/public_html/site <Directory /home/mistral/public_html/site> Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec AllowOverride FileInfo AuthConfig Limit </Directory> # jeu de caractères (UTF-8 par défaut) AddDefaultCharset UTF-8) </VirtualHost>hosts :
127.0.0.1 localhost site localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost site localhost.localdomain localhost6 localhost6.localdomain6J'ai placé une page de test dans le dossier "site".
Lorsque je suis connecté à un réseau sans fil/cablé, aucun soucis que ce soit pour "localhost" ou "site".
Lorsque je suis déconnecté, aucun soucis pour "localhost", en revanche, impossible d'afficher la page pour "site".Un ping, et "site" répond sans broncher
[mistral@Verne ~]$ ping site PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.054 ms 64 bytes from localhost (127.0.0.1): icmp_req=2 ttl=64 time=0.057 ms 64 bytes from localhost (127.0.0.1): icmp_req=3 ttl=64 time=0.057 ms ^C --- localhost ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.054/0.056/0.057/0.001 msSi quelqu'un a la moindre idée du pourquoi, je suis preneur! :)
Merci d'avance!
Mistral
PS : Le problème est présent sous FF et Chromium
bonjour,
lorsque tu est déconnecté, tu accèdes en local sur ta machine donc normalement par localhost et non le nom de ton site 
Hors ligne
Merci pour ta réponse totophe56.
Pourtant, c'est bien le principe des hôtes virtuels!
Depuis le passage à Fedora 17, le problème semble s'être résolu tout seul! ;)
Merci encore.
## Mistral ##
Asus K52JT - Intel® Core™ i5 CPU M 480 @ 2.67GHz × 4
ATI Radeon HD 6370M 1Gb - 8Go DDR3 - HDD 640Go - Fedora 16 'Verne' :)
Hors ligne