Mod_Dav in Xampp

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Mod_Dav in Xampp

Postby krzysztof92 » 11. April 2004 14:40

Hallo
Ich hab mir Mod_Dav in Apache reingemacht! Und alles eingestellt, doch will er noch immer nicht. :cry:
In der datei moddav.conf hab ich es so gemacht:

Listen 81
NameVirtualHost 127.0.0.1:81


<VirtualHost 127.0.0.1:81>
ServerAdmin webmaster@localhost
DocumentRoot C:/xampp/webdav/
ServerName localhost
ErrorLog logs/loaclhost-error_log
CustomLog logs/localhost-access_log common
AccessFileName .htaccess
DAVLockDB C:/xampp/webdav/tmp/LockDB
<Location />
DAV On
AuthType basic
AuthName "WAMPP mit WebDAV"
AuthUserfile C:/xampp/webdav/.htpasswd
<LimitExcept GET HEAD OPTIONS>
require user wampp
</LimitExcept>
</Location>

<Directory "C:/xampp/webdav/">
DAV On
Options ALL
AllowOverride All
AddHandler cgi-script .cgi .exe
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

wo ist der fehler?
:?:
krzysztof92
 
Posts: 1
Joined: 11. April 2004 14:36

WebDAV installation

Postby Cem » 01. September 2004 12:34

Enabling WebDAV on Apache
April 7, 2003

If you are using a statically built server you can skip over this bit. If you're using a dynamic setup, you must tell Apache to load the corresponding DAV module. For Apache 1.3.x under Unix edit the httpd.conf file, find the LoadModule section and uncomment or add the line:

LoadModule dav_module libexec/libdav.so

Under Windows you need:

LoadModule dav_module libexec/mod_dav.dll

Under Mac OS X you need:

LoadModule dav_module libexec/httpd/libdav.so

For Apache 2.x under Unix or Mac OS X, mod_dav you'll need:

LoadModule dav_module modules/mod_dav.so

Under Windows you need:

LoadModule dav_module modules/mod_dav.dll

The next steps are more complex, so we'll take a little breather and find out exactly what is needed. To make use of WebDAV you must provide the location of a lock file (using the DAVLockDB directive) which will be used to record which user has a particular file open for writing or updating and prevents multiple users from trying to write to the same file. You can also specify a timeout value; Apache will automatically remove a lock if no access occurs during this period, the client specifies the requested timeout during connection, but you can override this using the DAVMinTimeout directive. These first two settings are handled by two lines in our httpd.conf file that you can you place more or less anywhere; the first sets the lock file location and the second the timeout value, in seconds:

DAVLockDB /tmp/DAVLock
DAVMinTimeout 600

I've used /tmp here for the lock file location, if you're particularly security conscious you might to use a different directory which is more secure. Note as well that these settings are global to the Apache server instance - we don't need to specify different lock databases for different directories. You can, however, specify different timeout values for different directories just by embedding the DAVMinTimeout.

To enable individual directories with DAV functionality we use a Location directive -- a straightforward DAV directive tells Apache to enable WebDAV on this location. We can also use the Location directive to enable security on the directory both to secure the information we'll be storing and to prevent just anybody adding information to our WebDAV enabled directory. The following block specifies the location of a password file and limits everything but read operations from our directory using the LimitExcept directive:

<Location /dav/>
DAV On
AuthType Basic
AuthName "WebDAV Restricted"
AuthUserFile /export/http/webs/pri.mcslp/dav/.DAVlogin
<LimitExcept GET HEAD OPTIONS>
Require user webdav
</LimitExcept>
</Location>

The last step is to create our password file (unless we're using an existing one) and if necessary the directory we're enabling with WebDAV:

mkdir /export/http/webs/pri.mcslp/dav
chgrp www /export/http/webs/pri.mcslp/dav
chmod 775 /export/http/webs/pri.mcslp/dav
htpasswd -c /export/http/webs/pri.mcslp/dav/.DAVlogin webdav

Once all that is done, we need to restart the Apache server to enable the new settings. Under Unix/Mac OS X we can do this with apachectl:

apachectl restart

Within Windows, use the Restart control option available from the Start menu.

Testing your Setup
If you are using Mac OS X, probably the easiest way to test it is to share one of your calendars in iCal. Choose Publish from the Calendar menu, choose Publish from a Web Server and enter the full URL of your server and DAV-enabled directory, then enter the username and password you set. Assuming everything has gone correctly, you should have published your calendar to the WebDAV share.

Under Windows, Windows 98, Me, 2000 and XP can all access a Web Share (the Microsoft term for a WebDAV-enabled directory). Use the Add a Network Place wizard, either through the links in the My Network Places window or through a standard File Open/Save dialog and enter the URL - you'll be prompted for a username and password.

Alternatively use a WebDAV enabled client like JEdit. JEdit is Java based and happens to be a very good editor. It also has a plug-in that allows you to open and save files directly from and to a WebDAV folder.
User avatar
Cem
 
Posts: 47
Joined: 11. October 2003 21:41


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 29 guests