在内网中 暂时需要一台 文件 服务器,所以准备安装一台 http服务器并开启目录访问权限。这次使用 apache 在 fedora 28 机器上:

因为 fedora 28 已经包含 httpd 软件,使用

systemctl start httpd 就能进行启动。

启动时 默认开启 目录访问权限,但是首次访问网站根目录的时候,会显示test page.

进入如下文件夹:

[root@dhcp-- conf.d]# pwd
/etc/httpd/conf.d
[root@dhcp-- conf.d]# cat welcome.conf
#
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL. To disable the
# Welcome page, comment out all the lines below.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument /.noindex.html
</LocationMatch> <Directory /usr/share/httpd/noindex>
AllowOverride None
Require all granted
</Directory>

进行注释上述文件:

[root@dhcp-- conf.d]# cat welcome.conf
#
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL. To disable the
# Welcome page, comment out all the lines below.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
#<LocationMatch "^/+$">
# Options -Indexes
# ErrorDocument /.noindex.html
#</LocationMatch> #<Directory /usr/share/httpd/noindex>
# AllowOverride None
# Require all granted
#</Directory> #Alias /.noindex.html /usr/share/httpd/noindex/index.html

httpd 文件配置如下所示:

<Directory "/var/www/html">
#
# 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 #
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None #
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
Options  indexes FollowSymLinks
这个配置表明为 开启目录权限
结束后,你会看到如下所示画面:

完成!

祝您使用愉快,小技术方便您的生活。

保持更新,转载请注明出处。

fedora 开启 apache 并 开启目录浏览模式的更多相关文章

  1. 开启 Android WebView 的安全浏览模式

    Hybrid App(混合式开发)已经是每一个商业应用都会使用的开发手段.其最大的优势就是将一些可动态更新的内容页面使用 H5 开发,然后借用移动端原生系统提供的 WebView 控件加载进来.这种方 ...

  2. Apache配置支持目录浏览

      主配置文件 httpd.conf 中修改: 1)添加支持模块 LoadModule autoindex_module modules/mod_autoindex.so LoadModule dir ...

  3. IIS目录浏览模式打开文件还是无法下载

    写在前面的话 IIS已经设置目录浏览启用,且可以正常访问到文件,说明这些设置没问题,但是点击文件进行下载时,却提示无法下载,文件不存在等等,有的又可以,一顿操作后发现,原来是文件类型没有包含在MIME ...

  4. Nginx 和 Apache 开启目录浏览功能

    1.Nginx 在相应项目的 Server 段中的 location 段中,添加 autoindex on.例如: server { listen ; server_name www.dee.prac ...

  5. 关闭或者开启apache的目录浏览

    为了安全或者方便需要关闭或者开启apache的目录浏览   关闭目录浏览    修改http.conf 文件    Options Indexes FollowSymLinks     改为      ...

  6. IIS7开启目录浏览功能

    IIS7开启目录浏览功能: 在右侧操作中点击启用,并在左侧面板中勾选显示字段.

  7. nginx开启网站目录浏览功能

    一.开启全站目录浏览功能 编辑nginx.conf, 在http下面添加以下内容: autoindex on; # 开启目录文件列表 autoindex_exact_size on; # 显示出文件的 ...

  8. PHP开启目录引索+fancyindex漂亮目录浏览带搜索功能

    PHP开启目录引索 一. 前言 不知为何对nginx情有独钟, 最近练习php, 为了方便写代码, 便想要开启nginx的目录索引功能, 显然不如Apache开启的方便, 几次尝试都崩了... 我这个 ...

  9. nginx开启目录浏览,解决中文乱码问题

    nginx开启目录浏览,解决中文乱码问题 方法如下: server { listen 80; #listen [::]:80; server_name gongzi.liwenhui.xin gz.l ...

随机推荐

  1. Undo日志文件的产生和使用

    Undo 日志 比如A有200块钱, B有50 块钱,现在A要给B转100块” . (1)  开始事务 T1 (假设T1是个事务的内部编号) (2)  A余额 = A余额 -100 (3)  B余额 ...

  2. Maven 入门——认识Maven结构

    1.settings.xml 元素解读 localRepository 该元素表示本地 Maven 仓库的地址,不设置的话,默认为 ~/.m2/repository pluginGroups 将插件的 ...

  3. JDK7与JDK8中HashMap的实现

    JDK7中的HashMap HashMap底层维护一个数组,数组中的每一项都是一个Entry transient Entry<K,V>[] table; 我们向 HashMap 中所放置的 ...

  4. 每天一个linux命令(目录)

    转:http://www.cnblogs.com/peida/archive/2012/12/05/2803591.html 开始详细系统的学习linux常用命令,坚持每天一个命令,所以这个系列为每天 ...

  5. ES 记录之如何创建一个索引映射,以及一些设置

    ElasticSearch 系列文章 1 ES 入门之一 安装ElasticSearcha 2 ES 记录之如何创建一个索引映射 3 ElasticSearch 学习记录之Text keyword 两 ...

  6. [NOI 2016]优秀的拆分

    Description 题库链接 给你一个长度为 \(n\) 的只含小写字母的字符串 \(S\) ,计算其子串有多少优秀的拆分. 如果一个字符串能被表示成 \(AABB\) 的形式,其中 \(A,B\ ...

  7. kooboocms遇到的问题

    1.工作流:需要在网站的内容设置里启用工作流,然后添加一个工作流,再在内容文件夹里设置工作流属性(经测试,工作流对网络用户才有效,也就是说必须把用户添加到该网站下) 2.网络用户页面bug:在行 1. ...

  8. C#+三层+会员管理系统源码

    本打算上51aspx的   但是他们说我做的太简单..,那我还是拿出来共享给大家 源码下载地址 链接:http://pan.baidu.com/s/1boAwv2R 密码:ycrf 源码描述:一.源码 ...

  9. [android] 帧动画和补间动画

    逐帧显示一张图片,连起来成为动画 在res/drawable/目录下,创建一个xxx.xml的文件 添加<animation-list>节点,设置是否循环android:oneshot:” ...

  10. Java JDBC SqlServer

    一.驱动 下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=11774 引用Jar包时注意区分Java版本: Sqljdbc4 ...