我正在尝试使用 WEBDAV 沙丁鱼概念在 apache http 服务器(某些 Url)中上传文件。我为文件上传和 Apache 服务器配置等进行了编码。我想通过身份验证来读写这个文件。所以,我在apache中添加了.htaccess密码文件。当我尝试通过身份验证上传文件时,文件上传没有发生,但它提示文件读取操作的身份验证。并且我得到了一些需要授权的错误 -500 内部服务器错误。我不知道为什么我会收到这个错误..我认为它没有读取我的密码文件,而单独上传..我不知道如何清除这个错误..当我在没有身份验证的情况下执行相同的文件上传操作时,然后文件上传正在工作,但是,它没有提示文件读取的身份验证..
I configured my apache http server 2.2 using below Link
http://www.mkyong.com/apache/how-to-enable-webdav-in-apache-server-2-2-x-windows/
This is my httpd-dav.conf file
Alias /sites "E:/Apache Software Foundation/Apache2.2/sites"
<Directory "E:/Apache Software Foundation/Apache2.2/sites">
DavLockDB "E:/Apache Software Foundation/Apache2.2/var/DavLock"
#DAVMinTimeout 600
Alias /sites "E:/Apache Software Foundation/Apache2.2/sites"
<Directory "E:/Apache Software Foundation/Apache2.2/sites">
Dav On
AllowOverride None
Options None
Order Allow,Deny
Order deny,allow
Deny from 10.80.100.160
Allow from 10.80.100.160
AuthType Digest
AuthName DAV-upload
# Options Indexes
Options Indexes MultiViews FollowSymLinks
AuthUserFile "C:/Program Files/user.passwd"
#AccessFileName "C:/Program Files/user.passwd"
AuthDigestProvider file
AllowOverride None
# Allow universal read-access, but writes are restricted
# to the admin user.
<Limit GET POST PROPFIND OPTIONS HEAD>
# require user admin
require valid-user
</Limit>
</Directory>
This is my htaccess password file
admin:DAV-upload:encrypted pwd
Nagu:DAV-upload:encrypted pwd
Prashant:DAV-upload:encrypted pwd
I enabled Following LoadModule and Include Statement in my httpd.conf by referring below link
http://www.mkyong.com/apache/how-to-enable-webdav-in-apache-server-2-2-x-windows/
LoadModule alias_module modules/mod_alias.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule setenvif_module modules/mod_setenvif.so
# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf
Please help me dude.. Thanks in advance..