Le Forum Non Officiel de la DEDIBOX
Vous n'êtes pas identifié.
Salut à tous,
j'ai un petit pb avec mes hotes virtuels... Le site "default" n'est pas pris en compte... En effet le site par defaut (donc dans le fichier default n'est jamais pris en compte alors que les sites aaa.mondomaine.com bbb.mondomaine.com et ccc.mondomaine.com fonctionnent correctement...
D'ou est ce que cela peux venir ?
Merci pour vos infos.
J'ai essayé de regrouper tous mes virtuals hosts dans un fichier que voici sans suuccès...
NameVirtualHost mondomaine.net
<VirtualHost aaa.mondomaine.net>
ServerAdmin webmaster@localhost
DocumentRoot /www/aaa/
<Directory /www/aaa/>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /www/aaa/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost bbb.mondomaine.net>
ServerAdmin webmaster@localhost
DocumentRoot /www/bbb/
<Directory /www/bbb/>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /www/bbb/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /www/
<Directory /www/>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>A savoir :
aaa.mondomaine.net va bien sur la bonne page
bbb.mondomaine.net va bien sur la bonne page
abc.mondomaine.net va sur aaa.mondomaine.net alors que la page par défaut et /
que faire pour que l'hote par defaut soit correctement pris en place ? A savoir aussi que j'ai essayé de mettre (au début pour etre plus précis) de définir l'hote "par defaut" en début de fichier mais ca ne fait rien du tout. Je tourne en rond.
Merci de vos précieux conseils
Dernière modification par cyrilpop (2008-08-05 16:30:39)
Hors ligne
Le virtual host par défaut, s'il n'est pas trouvé dans sites-enabled, sera le premier vhost trouvé par apache durant le parsing du / des fichiers.
Hors ligne