当前位置:网站首页>在 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 的形式来访问。用户名和密码即是上述设置的内容。
注:以上配置未经验证,仅供参考
边栏推荐
- Runc hang causes the kubernetes node notready
- When synchronized encounters this thing, there is a big hole, pay attention!
- 读《认知觉醒》
- Understand bloomfilter in one article
- Uva536 binary tree reconstruction tree recovery
- Introduction to random and threadlocalrandom analysis
- Kivy教程之 08 倒计时App实现timer调用(教程含源码)
- R language -- readr package reads and writes data
- Master the use of auto analyze in data warehouse
- Langue C: trouver le nombre de palindromes dont 100 - 999 est un multiple de 7
猜你喜欢

Full arrangement (medium difficulty)
![[leetcode] 96 and 95 (how to calculate all legal BST)](/img/d5/788c88064bce6a7c4499017908b3f2.jpg)
[leetcode] 96 and 95 (how to calculate all legal BST)

Servlet learning notes

C fonctions linguistiques

Concepts and theories related to distributed transactions

ArgMiner:一个用于对论点挖掘数据集进行处理、增强、训练和推理的 PyTorch 的包

DC-5 target

runc hang 导致 Kubernetes 节点 NotReady

CANN算子:利用迭代器高效实现Tensor数据切割分块处理

Transformer principle and code elaboration (tensorflow)
随机推荐
分布式事务相关概念与理论
PostgreSQL 9.1 飞升之路
Reinforcement learning - learning notes 1 | basic concepts
Daily Mathematics Series 57: February 26
Alibaba cloud award winning experience: build a highly available system with polardb-x
ISO 27001 Information Security Management System Certification
WPF double slider control and forced capture of mouse event focus
Abnormal mode of ARM processor
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
C語言:求100-999是7的倍數的回文數
Cadence physical library lef file syntax learning [continuous update]
A treasure open source software, cross platform terminal artifact tabby
Etcd 存储,Watch 以及过期机制
6 分钟看完 BGP 协议。
Global and Chinese markets for soluble suture 2022-2028: Research Report on technology, participants, trends, market size and share
Iterm tab switching order
How to realize the function of Sub Ledger of applet?
MDK在头文件中使用预编译器时,#ifdef 无效的问题
Definition of cognition
Fundamentals of container technology