【问题标题】:Configure apache web server on Ubuntu to do directory listing of all directories by default在 Ubuntu 上配置 apache web server 默认做所有目录的目录列表
【发布时间】:2017-07-26 21:46:18
【问题描述】:

如何在 Ubuntu 上配置 apache 网络服务器默认列出所有目录?

我添加了这个条目

<Directory /var/lib/jenkins>
        Options +Indexes
</Directory>

在我的

/etc/apache2/apache2.conf

但列表仍然不起作用。如何启用mod_autoindex 模块?

【问题讨论】:

    标签: apache ubuntu configuration webserver


    【解决方案1】:

    如果您创建了一个特定文件来加载模块,您可以在该文件中添加以下行:

    LoadModule autoindex_module modules/mod_autoindex.so
    

    您可以通过查看 httpd.conf 来查看您是否有另一个配置文件,或者我猜在您的情况下 apache2.conf 中的一行会说:

    Include /insert/path/to/modules/config/file
    

    如果 apache2.conf 是它加载模块的位置,只需添加我在答案中输入的第一个代码块行。

    请随时查看文档,了解通过 https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html 使用 mod_autoindex 后可以进行哪些自定义

    如果您想通过索引获得“花哨”,请查看 FancyIndexing 选项 - https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html#indexoptions.fancyindexing

    【讨论】:

      猜你喜欢
      • 2016-11-29
      • 2011-12-17
      • 1970-01-01
      • 1970-01-01
      • 2014-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-05
      相关资源
      最近更新 更多