美文网首页
文件服务器配置

文件服务器配置

作者: 游侠_6fb7 | 来源:发表于2020-04-14 10:42 被阅读0次

apache服务器已经集成了WebDAV模块,所以只需要启用该模块即可。

  1. 编辑 /etc/httpd/conf/httpd.conf
    $ vi /etc/httpd/conf/httpd.conf
    在文件的最后添加以下语句:
    Include conf/webdav.conf #指定webdav的配置文件路径
  2. 新建webdav配置文件
    $ vi /etc/httpd/conf/webdav.conf
    将以下内容插入到文件中:
    <IfModule mod_dav.c>
    LimitXMLRequestBody 131072
    Alias /webdav "/var/www/webdav"
    <Directory /var/www/webdav>
    Dav On
    Options +Indexes
    IndexOptions FancyIndexing
    AddDefaultCharset UTF-8
    AuthType Basic
    AuthName "WebDAV Server"
    AuthUserFile /etc/httpd/webdav.users.pwd
    Require valid-user
    Order allow,deny
    Allow from all
    </Directory>
    </IfModule>
  3. mkdir -p /var/www/webdav chown apache:apache /var/www/webdav
  4. 添加用户
    $ htpasswd -c /etc/httpd/webdav.users.pwd test #根据提示输入密码
  5. 重启apache服务
    $ service httpd restart

mac webdav服务
cd /etc/apache2
sudo vim httpd.conf // 查找httpd-dav.conf /httpd-dav.conf 通过搜索找到这几行 LoadModule dav_module libexec/apache2/mod_dav.so LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so 并且把他们行首的#号删除 (友情提示,他们这些行长的都很像一定要看清了别改错了) 按esc完成编辑,输入:wq退出 // 然后切换目录 cd /etc/apache2/extra
// 备份文件(切记只要备份一次就行)
sudo cp httpd-dav.conf httpd-dav.conf.bak // 现在要编辑这个文件了 sudo vim httpd-dav.conf
// 查找Digest 把编辑模式从Digest改成Basic 还是那几步,改完了之后保存退出
http://www.linuxidc.com/Linux/2015-02/113577.htm
https://www.cnblogs.com/QianChia/p/5824382.html

页面展示配置 参考配置文档 https://www.linuxidc.com/Linux/2017-01/139442.htm

展示不全,乱码配置

Further relax access to the default document root:

<Directory "/opt/xxx/download">

#

# Possible values for the Options directive are "None", "All",

# or any combination of:

#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

# The Options directive is both complicated and important.  Please see

# http://httpd.apache.org/docs/2.4/mod/core.html#options

# for more information.

#

Options Indexes FollowSymLinks

#add by wangjun

indexOptions FancyIndexing ScanHTMLTitles NameWidth=* DescriptionWidth=* HTMLTable Charset=UTF-8 VersionSort FoldersFirst

#

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be "All", "None", or any combination of the keywords:

配置完成后重启apache服务

相关文章

  • 常用的nginx server配置

    常用文件服务器配置 普通的反向代理配置 带ssl证书的反向代理配置 强制跳转到https访问的配置 将url中包含...

  • 02第二章开发环境的安装预配置讲解

    2.1 linux软件源配置与学习建议 2.2 jdk安装讲解 2.3 vsftpd文件服务器安装于配置详解

  • Minio

    windows下部署minio文件服务器默认配置@echo offtitle miniominio.exe ser...

  • Nginx配置虚拟主机

    标签(空格分隔): nginx 1 新增域名为 $host 静态文件服务器 1.1 打开 Nginx 配置文件 /...

  • Fastdfs分布式文件配置方案

    详细配置fastdfds分布式文件服务器的方法: 跟踪服务器:192.168.4.121 (edu-dfs-tra...

  • nginx文件目录服务器

    用nginx配置一个文件服务器,并解决中文乱码问题,配置文件 如果,开放目录,当时不允许直接访问,只能访问指定路径...

  • nfs 共享多个linux服务器文件

    一、文件服务器 检查是否安装 安装nfs 新建分享文件夹 配置 共享目录为/sharedata,可以被172.17...

  • 文件服务器配置

    apache服务器已经集成了WebDAV模块,所以只需要启用该模块即可。 编辑 /etc/httpd/conf/h...

  • 配置WebDav-macOS

    系统macOS Big Sur系统版本11.6.5 1.文件服务器,使用http协议上传和下载文件2.配置webD...

  • nginx 添加第三方模块

    nginx 添加第三方模块 添加第三方模块 搭建文件服务器 fastdfs + nginx 过程中配置nginx部...

网友评论

      本文标题:文件服务器配置

      本文链接:https://www.haomeiwen.com/subject/qnkzmhtx.html