next up previous contents Next:  Directives communes. Up: Installation et configuration d'Apache. Previous: Installation et configuration d'Apache.   Table des matières  

37.2.1  httpd.conf.

Apache possède plusieurs fichiers de configuration hérités des premiers développements: access.conf et srm.conf en sont deux exemples. Ces fichiers sont désormais obsolètes et devraient rester vides. Un fichier de configuration élémentaire /opt/apache/conf/httpd.conf devrait contenir au minimum:

ServerType standalone 
ServerRoot ``/opt/apache'' 
PidFile /opt/apache/logs/httpd.pid 
ScoreBoardFile /opt/apache/logs/httpd.scoreboard 
Port 80 
User nobody 
Group nobody 
HostnameLookups Off 
ServerAdmin webmaster@cranzgot.co.za 
UseCanonicalName On 
ServerSignature On 
DefaultType text/plain 
ErrorLog /opt/apache/logs/error_log 
LogLevel warn 
LogFormat ``%h %l %u %t \''%r\'' %>s %b'' common 
CustomLog /opt/apache/logs/access_log common 
DocumentRoot ``/opt/apache/htdocs'' 
DirectoryIndex index.html 
AccessFileName .htaccess 
<Directory /> 
   Options FollowSymLinks 
   AllowOverride None 
   Order Deny,Allow 
   Deny from All 
</Directory> 
<Files ~ ``^\.ht''> 
   Order allow,deny 
   Deny from all 
</Files> 
<Directory ``/opt/apache/htdocs''> 
   Options Indexes FollowSymLinks MultiViews 
   AllowOverride All 
   Order allow,deny 
   Allow from all 
</Directory> 
<Directory ``/opt/apache/htdocs/home/*/www''> 
   Options Indexes MultiViews 
   AllowOverride None 
   Order allow,deny 
   Allow from all 
</Directory> 
UserDir /opt/apache/htdocs/home/*/www 


Une fois le fichier de configuration prêt, vous pouvez déplacer le fichier index.html dans /opt/apache/htdocs/. Vous verrez qu'il y a un manuel complet d'Apache et une page de démonstration déjà installée. A présent, vous pouvez les déplacer dans un autre répertoire et exécutez:

/opt/apache/bin/httpd -X


next up previous contents Next:  Directives communes. Up: Installation et configuration d'Apache. Previous: Installation et configuration d'Apache.   Table des matières  
1-01-2006