fedora 开启 apache 并 开启目录浏览模式
在内网中 暂时需要一台 文件 服务器,所以准备安装一台 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 并 开启目录浏览模式的更多相关文章
- 开启 Android WebView 的安全浏览模式
Hybrid App(混合式开发)已经是每一个商业应用都会使用的开发手段.其最大的优势就是将一些可动态更新的内容页面使用 H5 开发,然后借用移动端原生系统提供的 WebView 控件加载进来.这种方 ...
- Apache配置支持目录浏览
主配置文件 httpd.conf 中修改: 1)添加支持模块 LoadModule autoindex_module modules/mod_autoindex.so LoadModule dir ...
- IIS目录浏览模式打开文件还是无法下载
写在前面的话 IIS已经设置目录浏览启用,且可以正常访问到文件,说明这些设置没问题,但是点击文件进行下载时,却提示无法下载,文件不存在等等,有的又可以,一顿操作后发现,原来是文件类型没有包含在MIME ...
- Nginx 和 Apache 开启目录浏览功能
1.Nginx 在相应项目的 Server 段中的 location 段中,添加 autoindex on.例如: server { listen ; server_name www.dee.prac ...
- 关闭或者开启apache的目录浏览
为了安全或者方便需要关闭或者开启apache的目录浏览 关闭目录浏览 修改http.conf 文件 Options Indexes FollowSymLinks 改为 ...
- IIS7开启目录浏览功能
IIS7开启目录浏览功能: 在右侧操作中点击启用,并在左侧面板中勾选显示字段.
- nginx开启网站目录浏览功能
一.开启全站目录浏览功能 编辑nginx.conf, 在http下面添加以下内容: autoindex on; # 开启目录文件列表 autoindex_exact_size on; # 显示出文件的 ...
- PHP开启目录引索+fancyindex漂亮目录浏览带搜索功能
PHP开启目录引索 一. 前言 不知为何对nginx情有独钟, 最近练习php, 为了方便写代码, 便想要开启nginx的目录索引功能, 显然不如Apache开启的方便, 几次尝试都崩了... 我这个 ...
- nginx开启目录浏览,解决中文乱码问题
nginx开启目录浏览,解决中文乱码问题 方法如下: server { listen 80; #listen [::]:80; server_name gongzi.liwenhui.xin gz.l ...
随机推荐
- CentOS7 下编译安装 Samba,什么是 SMB/CIFS 协议
目录 一.关于 Samba 1. SMB 2. Samba 二.yum 安装 Samba 1. 安装 Samba 2. 查看版本 3. 查看配置文件 4. 启动服务 5. 本地客户端验证 6. Win ...
- Web开发者应知的URL编码知识
原文出处:http://blog.jobbole.com/42246/ 本文首先阐述了人们关于统一资源定位符(URL)编码的普遍的误读,其后通过阐明HTTP场景下的URL encoding 来引出我们 ...
- 【杂谈】Java I/O的底层实现
前言 Java I/O功能封装的很好,使用起来很方便,就是刚开始学的时候,如果不了解装饰器模式,会被他繁多的类给吓到.用多了也就习惯了,而且现在有很多实用的封装良好的实用类,可直接读写整个文件.开发者 ...
- SpringBoot入门 (十二) 定时任务
本文记录在SpringBoot中使用定时任务. 在我们的项目中,经常需要用到定时任务去帮我们做一些事情,比如服务状态监控,业务数据状态的更改等,SpringBoot中实现定时任务有2中方案,一种是自带 ...
- 复刻smartbits的国产网络测试工具minismb-如何测试DPI引擎
复刻smartbits的网络性能测试工具MiniSMB,是一款专门用于测试智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此以太网测试工具测试任何ip网络设备的端口吞吐率,带宽,并发 ...
- 基于vue实现一个简单的MVVM框架(源码分析)
不知不觉接触前端的时间已经过去半年了,越来越发觉对知识的学习不应该只停留在会用的层面,这在我学jQuery的一段时间后便有这样的体会. 虽然jQuery只是一个JS的代码库,只要会一些JS的基本操作学 ...
- 在window环境下挂载mysql数据卷
1.提前在指定的目录下创建一个my.cnf文件,目录名最好为英文且不带特殊符号和空格,文件内容如下,注意:粘贴时要把每一行末尾的空格去除,否则运行时会报错说utf8编码错误 [mysqld] user ...
- jQuery找到GridView控件ItemTemplate模版内的控件
可以使用下面的方法,jQuery找到GridView控件ItemTemplate模版内的CheckBox: 使用jQuery的find()方法:
- SQLServer之视图篇
1 视图介绍 视图是从一个或者几个基本表(或视图)导出的表.它与基本表不同,是一个虚表.数据库中只存放视图的定义,而不存在视图对应的数据,这些数据仍然存放在原来的基本表中.所以一旦基 ...
- Redis-其他命令
1.排序 SORT : SORT sourcekey [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [A ...