Config Apache pour webdav

Salut,

Je suis sous une FC4 avec Apache.

Je voudrais configurer un serveur webdav

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

[code]

Section 1: Global Environment

ServerTokens OS
ServerRoot “/etc/httpd”
#ScoreBoardFile run/httpd.scoreboard
PidFile "/var/run/httpd.pid"
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

Listen 192.168.2.2:80

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.

Example:

LoadModule foo_module modules/mod_foo.so

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so

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
ServerAdmin rjc@9online.fr
ServerName RJCSERVEUR

UseCanonicalName on
DocumentRoot “/var/www/html”

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

UserDir "disable"
#UserDir public_html

DirectoryIndex
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

directories.

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/missing_handler.pl”
#ErrorDocument 402 http://www.example.com/subscription_info.html

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 “.your-domain.com” to match your domain to enable.

#<Location /server-status>

SetHandler server-status

Order deny,allow

Deny from all

Allow from .your-domain.com

#

Allow remote server configuration reports, with the URL of

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

Change the “.your-domain.com” to match your domain to enable.

#<Location /server-info>

SetHandler server-info

Order deny,allow

Deny from all

Allow from .your-domain.com

#

Proxy Server directives. Uncomment the following lines to

enable the proxy server:

#
#ProxyRequests On

#<Proxy *>

Order deny,allow

Deny from all

Allow from .your-domain.com

#

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
#NoCache a-domain.com another-domain.edu joes.garage-sale.com

#

End of proxy directives.

Section 3: Virtual Hosts

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

Virtual host Divers

<VirtualHost 192.168.2.2>
DocumentRoot /var/www/html/divers.ath.cx
ServerName divers.ath.cx
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Groupe

<VirtualHost 192.168.2.2>
DocumentRoot /var/www/html/grp.ath.cx
ServerName grp.ath.cx
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Tir

<VirtualHost 192.168.2.2>
DocumentRoot /var/www/html/tir.ath.cx
ServerName tir.ath.cx
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

Virtual host Loisirscreatifs

<VirtualHost 192.168.2.2>
DocumentRoot /var/www/html/loisirscreatifs.ath.cx
ServerName loisirscreatifs.ath.cx
ServerSignature email
DirectoryIndex index.html index.htm index.shtml

<Directory “/”>
Options FollowSymLinks

    AllowOverride None

<Directory “/var/www/html/grp.ath.cx”>

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”>
DAV On
AuthName 'WebDAV’
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
AuthGroupFile /dev/null

require valid-user

[/code]

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.

Merci

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:

Salut,

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…