当前位置:网站首页>在 Apache 上配置 WebDAV 服务器
在 Apache 上配置 WebDAV 服务器
2022-07-04 12:34:00 【星哥玩云】
WebDAV 使得应用程序可以直接将文件写到 Web Server 上,并且在写文件时候可以对文件加锁,写完后对文件解锁,还可以支持对文件所做的版本控制。基于 WebDAV 可以实现一个功能强大的内容管理系统或者配置管理系统。现在主流的 WEB 服务器一般都支持 WebDAV。下面较详细的介绍一下 WebDAV 在 APACHE 服务器中的配置。
一、修改 httpd.conf 文件
在末尾处加上以下内容:
Include conf/mod_dav.conf #下面将介绍该文件的设置
二、在 apache/conf/ 目录下新建一文件(mod_dav.conf),并输入以下内容
#Dav LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so DAVLockDB var/DavLock Alias /webdav “/home/webdavfolder” # 后面的路径就是电脑(或服务器)硬盘上的一个文件夹,用作网络存储器的空间 Dav On
这样配置,其实也就可以访问了(可通过windows的网上邻居访问)。但这样有个致命的缺点就是不需要密码就可以访问,安装性大大降低了。
三、增加安全性的配置
继续编辑上面第二步中的文件,改为:
#Dav filesystem DAVLockDB var/DavLock Alias /webdav “/home/webdavfolder” Dav On AuthType Basic AuthName DAV AuthUserFile /usr/local/svn/svn-auth-file #密码验证文件 require user user1
四、/usr/local/svn/svn-auth-file 文件的创建
进入 apache/bin 目录,执行以下命令产生密码验证文件:
htpasswd -cm /usr/local/svn/svn-auth-file user1
提示输入密码时输入该用户的密码。
若还需要增加用户user2,则执行以下命令:
htpasswd -m /usr/local/svn/svn-auth-file user2
删除某个用户(user2),可以使用下列指令:
htpasswd -D /usr/local/svn/svn-auth-file user2
五、修改完成后,重启apache
此时已经可以安全访问 WebDAV 了。可以通过 http://localhost/webdav 来访问共享资源了。当然,如果你是在服务器上配置的,使用 http://yourdomain.tld/webdav 的形式来访问。用户名和密码即是上述设置的内容。
注:以上配置未经验证,仅供参考
边栏推荐
- 数据库锁表?别慌,本文教你如何解决
- Two dimensional code coding theory
- Simple understanding of binary search
- Fastlane 一键打包/发布APP - 使用记录及踩坑
- 「小技巧」给Seurat对象瘦瘦身
- ArcGIS uses grid processing tools for image clipping
- C language: find the length of string
- 七、软件包管理
- Vit (vision transformer) principle and code elaboration
- CANN算子:利用迭代器高效实现Tensor数据切割分块处理
猜你喜欢

《预训练周刊》第52期:屏蔽视觉预训练、目标导向对话

C语言数组

After installing vscode, the program runs (an include error is detected, please update the includepath, which has been solved for this translation unit (waveform curve is disabled) and (the source fil

17. Memory partition and paging

Read the BGP agreement in 6 minutes.

runc hang 导致 Kubernetes 节点 NotReady

Complementary knowledge of auto encoder

ArcGIS uses grid processing tools for image clipping

Detailed explanation of mt4api documentary and foreign exchange API documentary interfaces

DC-5 target
随机推荐
干货整理!ERP在制造业的发展趋势如何,看这一篇就够了
认知的定义
n++也不靠谱
面试官:Redis 过期删除策略和内存淘汰策略有什么区别?
数据库锁表?别慌,本文教你如何解决
C language: find the length of string
Transformer principle and code elaboration (pytorch)
6 分钟看完 BGP 协议。
R language -- readr package reads and writes data
Detailed explanation of mt4api documentary and foreign exchange API documentary interfaces
CA:用于移动端的高效坐标注意力机制 | CVPR 2021
敏捷开发/敏捷测试感受
众昂矿业:为保障萤石足量供应,开源节流势在必行
When synchronized encounters this thing, there is a big hole, pay attention!
Global and Chinese market for naval vessel maintenance 2022-2028: Research Report on technology, participants, trends, market size and share
Daily Mathematics Series 57: February 26
使用 NSProxy 实现消息转发
Play Sanzi chess easily
从0到1建设智能灰度数据体系:以vivo游戏中心为例
mm_ Cognition of struct structure