Config Apache pour webdav



Je suis sous une FC4 avec Apache.

Je voudrais configurer un serveur webdav

Donc j’ai commencer par modifier mon httpd.conf:


Section 1: Global Environment

ServerTokens OS
ServerRoot “/etc/httpd”
#ScoreBoardFile run/httpd.scoreboard
PidFile "/var/run/"
TimeOut 300
KeepAlive false
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers 8 MinSpareServers 5 MaxSpareServers 20 MaxClients 150 MaxRequestsPerChild 100 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0


Dynamic Shared Object (DSO) Support

To be able to use the functionality of a module which was built as a DSO you

have to place corresponding `LoadModule’ lines at this location so the

directives contained in it are actually available before they are used.

Statically compiled modules (those listed by `httpd -l’) do not need

to be loaded here.


LoadModule foo_module modules/

LoadModule access_module modules/
LoadModule auth_module modules/
LoadModule auth_anon_module modules/
LoadModule auth_dbm_module modules/
LoadModule auth_digest_module modules/
LoadModule ldap_module modules/
LoadModule auth_ldap_module modules/
LoadModule include_module modules/
LoadModule log_config_module modules/
LoadModule env_module modules/
LoadModule mime_magic_module modules/
LoadModule cern_meta_module modules/
LoadModule expires_module modules/
LoadModule deflate_module modules/
LoadModule headers_module modules/
LoadModule usertrack_module modules/
LoadModule unique_id_module modules/
LoadModule setenvif_module modules/
LoadModule mime_module modules/
LoadModule dav_module modules/
LoadModule status_module modules/
LoadModule autoindex_module modules/
LoadModule asis_module modules/
LoadModule info_module modules/
LoadModule dav_fs_module modules/
LoadModule vhost_alias_module modules/
LoadModule negotiation_module modules/
LoadModule dir_module modules/
LoadModule imap_module modules/
LoadModule actions_module modules/
LoadModule speling_module modules/
LoadModule userdir_module modules/
LoadModule alias_module modules/
LoadModule rewrite_module modules/
LoadModule proxy_module modules/
LoadModule proxy_ftp_module modules/
LoadModule proxy_http_module modules/
LoadModule proxy_connect_module modules/
LoadModule cache_module modules/
LoadModule suexec_module modules/
LoadModule disk_cache_module modules/
LoadModule file_cache_module modules/
LoadModule mem_cache_module modules/
LoadModule cgi_module modules/

Load config files from the config directory “/etc/httpd/conf.d”.

Include conf.d/*.conf

#ExtendedStatus On

Section 2: ‘Main’ server configuration

User apache
Group apache

UseCanonicalName on
DocumentRoot “/var/www/html”

<LocationMatch “^/$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html

UserDir "disable"
#UserDir public_html

AccessFileName .htaccess
<Files ~ “^.ht”>
Order allow,deny
Deny from all

TypesConfig "/etc/mime.types"
DefaultType text/plain

# MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic

HostNameLookups Off
#EnableMMAP off
#EnableSendfile off
ErrorLog “/var/log/httpd/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

CustomLog logs/access_log common

CustomLog logs/access_log combined

#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#CustomLog logs/access_log combined

ServerSignature on

Alias /icons/ "/var/www/icons/"
Alias /manual “/var/www/manual”

# Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb

ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”

#Scriptsock logs/cgisock

IndexOptions FancyIndexing VersionSort NameWidth=*

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif …
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon is which icon to show for files which do not have an icon

explicitly set.

DefaultIcon /icons/unknown.gif

AddDescription allows you to place a short description after a file in

server-generated indexes. These are only displayed for FancyIndexed


Format: AddDescription “description” filename

#AddDescription “GZIP compressed document” .gz
#AddDescription “tar archive” .tar
#AddDescription “GZIP compressed tar archive” .tgz

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* ~ # HEADER README RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

DefaultLanguage fr

Danish (da) - Dutch (nl) - English (en) - Estonian (et)

French (fr) - German (de) - Greek-Modern (el)

Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)

Portugese (pt) - Luxembourgeois* (ltz)

Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)

Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)

Russian (ru) - Croatian (hr)

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage kr .kr
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr

LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw

ForceLanguagePriority Prefer Fallback

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5

For russian, more than one charset is used (depends on client, mostly):

AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8

AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis

AddType application/x-tar .tgz

#AddHandler cgi-script .cgi

#AddHandler send-as-is asis
AddHandler imap-file map
AddHandler type-map var
AddOutputFilter INCLUDES .shtml

Some examples:

#ErrorDocument 500 “The server made a boo boo.”
#ErrorDocument 404 /missing.html
#ErrorDocument 404 “/cgi-bin/”
#ErrorDocument 402

Alias /error/ “/var/www/error/”

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 “^WebDrive” redirect-carefully
BrowserMatch “^WebDAVFS/1.[012]” redirect-carefully
BrowserMatch “^gnome-vfs” redirect-carefully

Allow server status reports, with the URL of http://servername/server-status

Change the “” to match your domain to enable.

#<Location /server-status>

SetHandler server-status

Order deny,allow

Deny from all

Allow from


Allow remote server configuration reports, with the URL of

http://servername/server-info (requires that mod_info.c be loaded).

Change the “” to match your domain to enable.

#<Location /server-info>

SetHandler server-info

Order deny,allow

Deny from all

Allow from


Proxy Server directives. Uncomment the following lines to

enable the proxy server:

#ProxyRequests On

#<Proxy *>

Order deny,allow

Deny from all

Allow from


Enable/disable the handling of HTTP/1.1 “Via:” headers.

(“Full” adds the server version; “Block” removes all outgoing Via: headers)

Set to one of: Off | On | Full | Block

#ProxyVia On

To enable the cache as well, edit and uncomment the following lines:

(no cacheing without CacheRoot)

#CacheRoot “/etc/httpd/proxy”
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1


End of proxy directives.

Section 3: Virtual Hosts

LockFile "/var/lock/httpd.lock"
CoreDumpDirectory “/etc/httpd”

Virtual host Divers

DocumentRoot /var/www/html/
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Groupe

DocumentRoot /var/www/html/
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Tir

DocumentRoot /var/www/html/
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Loisirscreatifs

DocumentRoot /var/www/html/
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

<Directory “/”>
Options FollowSymLinks

    AllowOverride None

<Directory “/var/www/html/”>

Options Indexes Includes FollowSymLinks
 	AuthName "Acces Prive  Contactez l'administrateur"
	AuthType basic
AuthUserFile /etc/httpd/mdp
require valid-user
  	AllowOverride all
   	Allow from all
    Order allow,deny

<Directory “/var/www/icons”>
Options Indexes MultiViews
AllowOverride None
Allow from all
Order allow,deny

<Directory “/var/www/cgi-bin”>
Options ExecCGI
AllowOverride None
Allow from all
Order allow,deny

#Web DAV

DAVLockDB /ftp/dav/DAVLockDB

<Directory “/ftp/dav”>
AuthName 'WebDAV’
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
AuthGroupFile /dev/null

require valid-user


Le pb c’est quand je veux me connecter à localhost/dav/ depuis la machine ou est installé le serveur, il me dit:

The connection was refused when attempting to contact localhost.

Je présise que les deux répertoires dav et DAVLockDB sont en 777.



T’es sûr que ton serveur apache se lance bien et écoute sur les bonnes interfaces? Parce que “connection refused”, ça veut généralement dire qu’il n’y a rien qui écoute.


Sur appache le serveur web marche bien :laughing:



Bon donc maintenant il me dit,

Not Found

The requested URL /dav/ was not found on this server.

La je suis perdu :cry:


hello, je me suis permis de retoucher ton post, mais je n’ai pas plus d’idée…