ceturtdiena, 2012. gada 29. marts

WebDAV with Apache on Slackware 13.37

Edit httpd.conf, uncomment:
Include /etc/httpd/extra/httpd-dav.conf
at the end of file add:
DAVLockDB /var/www/DAVLock.db
DAVMinTimeout 600


# touch /var/www/DAVLock.db
# chown apache:apache /var/www/DAVLock.db


Create virtual host in /etc/httpd/extra/httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot "/var/www/htdocs"
ServerName example
ServerAlias www.example.com
<Directory "/var/www/htdocs">
Allow from all
</Directory>

# WebDav config part
Alias /webdav /var/www/htdocs
<Location "/webdav">
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /var/www/htdocs/passwd.dav
Require valid-user
</Location>
# End of WebDav config
ErrorLog "/var/log/httpd/example.com-error"
CustomLog "/var/log/httpd/example.com-custom" common
</VirtualHost>


Create password file:
# htpasswd -c /var/www/htdocs/passwd.dav test
# chown root:apache /var/www/htdocs/passwd.dav
# chmod 640 /var/www/htdocs/passwd.dav


Restart apache web server:
# /etc/rc.d/rc.httpd restart

Nav komentāru:

Ierakstīt komentāru

Ierakstīt komentāru