Bonjour lukhas,
Je suis désolé mais j’ai dû mal à comprendre. Reprenons au début. D’après le tutoriel que je suis, je dois avoir ces fichiers :
etc/apache2/ports.conf
[code]# If you just change the port or add more ports here, you will likely also
have to change the VirtualHost statement in
/etc/apache2/sites-enabled/000-default
This is also true if you have upgraded from before 2.2.9-3 (i.e. from
Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
README.Debian.gz
#NameVirtualHost *:80
Listen 80
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
[/code]
etc/apache2/sites-available/default
[code]# 2009-02-19 Debian LAMP Howto
This is a typical global Apache conf customisation. Install as
/etc/apache2/sites-available/default. There is NO vhost here.
ServerAdmin webmaster@sample.com
ServerSignature On
ServerTokens Minor
LogLevel warn
Options -Indexes +FollowSymLinks
AllowOverride None
<DirectoryMatch /.(svn|cvs|git)>
Order allow,deny
Deny from all
[/code]
Je crée également des fichiers de type etc/apache2/sites-available/site1, site2, etc…
[code]# 2009-02-19 Debian LAMP Howto
This is a sample vhost configuration file. Install as
/etc/apache2/sites-available/.
Redirects (to canonical host)
<VirtualHost *>
ServerName sample.com
ServerAlias sample2.com www.sample2.com
Redirect / http://www.sample.com/
Canonical host
<VirtualHost *>
ServerName www.sample.com
DocumentRoot /var/www/www.sample.com/root
<Directory /var/www/www.sample.com/root>
# To exec .php scripts via FastCGI, uncomment those 3 lines:
#Options +ExecCGI
#AddHandler fcgid-script .php
#FCGIWrapper /usr/local/bin/php5-fastcgi-wrapper .php
# Acceptable overrides:
# - FileInfo (.htacces-based rewrite rules)
# - AuthConfig (.htaccess-based basic auth)
AllowOverride FileInfo AuthConfig
</Directory>
# Map some private area and have some mandatory auth
Alias /private /var/www/www.sample.com/private
<Location /private>
AuthName "Private Area"
AuthType Basic
# Plain user/password
AuthUserFile /var/www/www.sample.com/private/.htpasswd
require valid-user
# Adress-based
Order Deny,Allow
Deny from all
Allow from 12.21.34.67
Allow from 33.44.55.0/24
Allow from 66.77.99.96/255.255.255.224
Allow from home.myname.com
Allow from .trustee.com
# The following means that "valid-user" OR "allowed <ip>" is okay
Satisfy any
</Location>
# Compress most static files
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript application/x-shockwave-flash
# Cope with proxies
Header append Vary User-Agent env=!dont-vary
# Cope with several bugs in IE6
BrowserMatch "\bMSIE 6" !no-gzip !gzip-only-text/html
ErrorLog /var/log/apache2/www.sample.com/error.log
CustomLog /var/log/apache2/www.sample.com/access.log combined
[/code]
etc/apache2/sites-enabled/000-default pointe sur etc/apache2/sites-available/default
etc/apache2/sites-enabled/site1 pointe sur etc/apache2/sites-available/site1
etc/apache2/sites-enabled/site2 pointe sur etc/apache2/sites-available/site2
etc…
Problème : Lorsque je tape mon_ip, il m’affiche le site défini dans etc/apache2/sites-available/site1
Or je souhaite voir s’afficher le contenu de /var/www.
Faut-il donc que je crée un vhost qui définit le DocumentRoot à /var/www, et qui soit en premier sur la liste (site0 par exemple), où que je modifie le etc/apache2/sites-available/default ?
Où mettre la directive NameVirtualHost si pas dans ports.conf ? Dans etc/apache2/sites-available/default ? Dans etc/apache2/sites-available/site0 ?
Désolé de ne pas comprendre du premier coup. 
P.S. : La veille info ça marche bien car à priori tu t’es enregistré ici grâce/à cause de moi. 