Enabling Webdav on Lampp-Server
Posted: 20. September 2020 08:18
Hello together,
I'm trying to enable Webdav on my server but can't get it to work.
I use MX Linux and the xampp-linux-7.4.10-0-installer.run.
I tried enabling Webdav by including the "etc/extra/httpd-dav.conf" file by uncommenting the line in the httpd.conf:
And created the file "user.passwd" by using the command in the corresponding httpd-dav.conf-file:
When I try to access the http://localhost/uploads/ in my Browser, I get "Error 403 - Forbidden access" without ever been asked to enter username and password. Same errors comes up in a webdav-client with entered username and password.
On thing that is confusing me, is that I can't find the folder "uploads" in /opt/lampp/ nor /opt/lampp/var/DavLock, so I created them myself but that changed nothing. (I also gave read and write permissions to daemon and to www-data).
The last thing I tried was to manually activate webdav for an other folder by putting the following into the httpd.conf-file:
But then I got an "Error 500 - internal server error" and the Erro-Log of the apache-server shows that it was unable to open the lock database and the property database. I tried giving permissions to daemon and www-data for the coressponding folder, which I manually created, again. At least I can't find a lock databse in the folder where it should be, so do I have to create it or should it be created automatically?
I would really appreciated help and I'm sorry for my bad English, I'm not used to write technical texts in English...
Christian
I'm trying to enable Webdav on my server but can't get it to work.
I use MX Linux and the xampp-linux-7.4.10-0-installer.run.
I tried enabling Webdav by including the "etc/extra/httpd-dav.conf" file by uncommenting the line in the httpd.conf:
- Code: Select all
# Distributed authoring and versioning (WebDAV)
Include etc/extra/httpd-dav.conf
And created the file "user.passwd" by using the command in the corresponding httpd-dav.conf-file:
- Code: Select all
#
# Distributed authoring and versioning (WebDAV)
#
# Required modules: mod_alias, mod_auth_digest, mod_authn_core, mod_authn_file,
# mod_authz_core, mod_authz_user, mod_dav, mod_dav_fs,
# mod_setenvif
# The following example gives DAV write access to a directory called
# "uploads" under the ServerRoot directory.
#
# The User/Group specified in httpd.conf needs to have write permissions
# on the directory where the DavLockDB is placed and on any directory where
# "Dav On" is specified.
DavLockDB "/opt/lampp/var/DavLock"
Alias /uploads "/opt/lampp/uploads"
<Directory "/opt/lampp/uploads">
Dav On
AuthType Digest
AuthName DAV-upload
# You can use the htdigest program to create the password database:
# htdigest -c "/opt/lampp/user.passwd" DAV-upload admin
AuthUserFile "/opt/lampp/user.passwd"
AuthDigestProvider file
# Allow universal read-access, but writes are restricted
# to the admin user.
<RequireAny>
Require method GET POST OPTIONS
Require user admin
</RequireAny>
</Directory>
#
# The following directives disable redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with several clients that do not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
BrowserMatch " Konqueror/4" redirect-carefully
When I try to access the http://localhost/uploads/ in my Browser, I get "Error 403 - Forbidden access" without ever been asked to enter username and password. Same errors comes up in a webdav-client with entered username and password.
On thing that is confusing me, is that I can't find the folder "uploads" in /opt/lampp/ nor /opt/lampp/var/DavLock, so I created them myself but that changed nothing. (I also gave read and write permissions to daemon and to www-data).
The last thing I tried was to manually activate webdav for an other folder by putting the following into the httpd.conf-file:
- Code: Select all
DavLockDB /opt/lampp/var/DavLock
<Directory "opt/lampp/htdocs/webdav/">
Require all granted
Dav On
</Directory>
But then I got an "Error 500 - internal server error" and the Erro-Log of the apache-server shows that it was unable to open the lock database and the property database. I tried giving permissions to daemon and www-data for the coressponding folder, which I manually created, again. At least I can't find a lock databse in the folder where it should be, so do I have to create it or should it be created automatically?
I would really appreciated help and I'm sorry for my bad English, I'm not used to write technical texts in English...
Christian