Currently employed @   ![]() ( 16.47 ) | > main > varia > WebdavSecure WebdavThe following is a HOWTO to setup secure WebDAV on a CentOS/Redhat based Linux server. This means the WebDAV does *NOT* need to be set to apache:apache for UID/GID access rights and hence the data can be stored securely in the user's own subdirectory with the correct UID/GID settings. There is also no need to compille as the Centos/Redhat apache binary's are re-used. Genereal setupThe following example is based on a 2-tier model, this means in the frontend you are adviced to put an SSL enabled vhost with uses ProxyPass to contact the backend webserver. The backend webserver is configured to only allow connections from the frontend webserver.Setup DIRSmkdir -p /home/<username>/WEBDAV/apache-dav mkdir -p /home/<username>/WEBDAV/apache-dav chmod 700 /home/<username>/WEBDAV cd /home/<username>/WEBDAV/apache-dav mkdir conf mkdir htdocs mkdir logs mkdir run ln -s /usr/lib/httpd/modules . Backend httpd.confAn exaple httpd.conf can be downloaded here. Install this in the directory /home/<username>/WEBDAV/apache-dav/confCreate password fileExecutehtdigest -c /home/to create a htdigest file holding your WebDAV username. Any backend for password handling off course can be chosen. Frontend configAdd the following in your frontend vhost for your domain (preferred you enable SSL on this domain)# Normal Proxy setup ProxyPass /<username>/WEBDAV/ http://<hostname>:14242/<username>/WEBDAV/ ProxyPassReverse /<username>/WEBDAV/ http://<hostname>:14242/<username>/WEBDAV/ # Windows will drop the tailing / so we also need to setup this ProxyPass ProxyPass /<username>/WEBDAV http://<hostname>:14242/<username>/WEBDAV ProxyPassReverse /<username>/WEBDAV http://<hostname>:14242/<username>/WEBDAV stop/start backend serverUse the following commands to stop/start your backend server:/usr/sbin/httpd -f /home/<username>/WEBDAV/apache-dav/conf/httpd.conf -k stop /usr/sbin/httpd -f /home/<username>/WEBDAV/apache-dav/conf/httpd.conf -k start Accessing the WebDav
Copyright 1997 - 2009 Ramses Smeyers. All rights reserved |