j’ai un peu nettoyé le fichier pour avoir qqc de plus lisible, et les options les plus intéressantes sont à la fin :
LockFile /var/lock/apache2/accept.lock
PidFile /var/run/apache2.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
AccessFileName .htaccess
<Files ~ “^.ht”>
Order allow,deny
Deny from all
TypesConfig /etc/mime.types
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
LogFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i”” combined
LogFormat “%h %l %u %t “%r” %>s %b” common
LogFormat “%{Referer}i -> %U” referer
LogFormat “%{User-agent}i” agent
ServerTokens Full
ServerSignature On
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# RCS CVS *,v *,t
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddLanguage en .en
AddLanguage fr .fr
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddCharset us-ascii .ascii .us-ascii
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-15 .iso8859-15 .latin9
AddCharset UTF-8 .utf8
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
voilà les options intéressantes
ServerRoot “/etc/apache2” racine pour la configuration
NameVirtualHost 192.168.1.100:80 je mettrais plutôt *:80
User www-data n’oublie pas de faire un chown -R www-data:www-data * dans le dossier qui contient des pages web
Group www-data
Include /etc/apache2/mods-enabled/.load là, c’est tous les autres fichiers de configuration qui sont utilisés en plus
Include /etc/apache2/mods-enabled/.conf ici les modules
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf normalement, ça contient juste listen 80
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/ là, c’est les différents sites
Il n’y a pas de référence à phpmyadmin, donc je pense que c’est normal que tu ne le vois pas. Quelle est la racine de phpmyadmin ?
Ce qu’il faut faire, c’est dire à Apache que même si les pages web de ton site se trouvent à /var/www (donc normalement 192.168.1.100/mondossier/index.php correspond à /var/www/mondossier/index.php ), l’adresse 192.168.1.100/phpmyadmin/index.php va correspondre à /etc/phpmyadmin/index.php ou qqc du genre
pour la doc, tout est dispo là : httpd.apache.org… (fais bien gaffe à prendre la bonne version !)
Edité le 27/09/2007 à 11:01