WebDAV December 28, 2010 10:25PM |
Registered: 13 years ago Posts: 35 |
Re: WebDAV December 29, 2010 10:54AM |
Registered: 13 years ago Posts: 261 |
Re: WebDAV December 29, 2010 06:38PM |
Registered: 13 years ago Posts: 35 |
Re: WebDAV December 30, 2010 04:35PM |
Registered: 13 years ago Posts: 35 |
The following assumes that myaccount is your username webdav.mydomain.local is your dockstar in your local (non-internet) domain mydomain.dyndns.org is your dynamic domain, which points to your internet router regardless of the actual servername used Credits http://www.howtoforge.de/howto/wie-man-webdav-mit-lighttpd-auf-debian-etch-konfiguriert/ http://www.mikrocontroller.net/articles/DockstarDebianSqueeze#Lighttpd.2C_Php.2C_Webdav http://www.asconix.com/howtos/debian/lighttpd-ssl-howto http://www.howtoforge.de/howto/howto-selbstsigniertes-ssl-zertifikat-erstellen/1 https://help.ubuntu.com/community/OpenSSL apt-get install lighttpd lighttpd-mod-webdav php5-cgi php5-xcache apache2-utils mkdir /var/run/lighttpd/ chown www-data:www-data /var/run/lighttpd/ lighty-enable-mod auth ssl webdav fastcgi fastcgi-php cd /var/www mkdir -p web1/www # normal pages and PMWiki go here mv index.lighttpd.html web1/www # just for a quick test mkdir -p web2/webdav # webdav files go here chown -R www-data:www-data * htpasswd -c /var/www/web2/webdav/passwd.dav myaccount chown root:www-data /var/www/web2/webdav/passwd.dav chmod 640 /var/www/web2/webdav/passwd.dav nano /etc/lighttpd/conf-available/10-webdav.conf # add the following: $HTTP["host"] =~ "webdav(\.mydomain\.(dyndns\.org)|(local))*" { server.document-root = "/var/www/web2/webdav" webdav.activate = "enable" webdav.is-readonly = "disable" auth.backend = "htpasswd" auth.backend.htpasswd.userfile = "/var/www/web2/webdav/passwd.dav" auth.require = ( "" => ( "method" => "basic", "realm" => "webdav", "require" => "valid-user" ) ) } Set up SSL certificates for *.mydomain.local *.mydomain.dyndns.org (see elsewhere for details) copy the two resulting .pem files to /etc/ssl/private/ nano /etc/lighttpd/conf-available/10-ssl.conf # change: $SERVER["socket"] == "0.0.0.0:443" { ssl.engine = "enable" ssl.pemfile = "/etc/ssl/private/mydomain.local-server_key_crt.pem" $HTTP["host"] =~ "\.dyndns\.org" { ssl.pemfile = "/etc/ssl/private/mydomain.dyndns.org-server_key_crt.pem" } } /etc/init.d/lighttpd restart Setup up your internet router so an arbitrary port above 50000 (say, 54321) is forwarded to your dockstar's ssl port, e.g. to 192.168.0.26:443 You should now be able to contact your webdav server locally e.g. cadaver http://webdav.mydomain.local or from the outside https://webdav.mydomain.dyndns.org:54321