在apache服务器下访问一个目录,如果没有index.html/index.php,则会报错。

为了访问文件夹:

1. 在 /var/www/html 目录下新建 /d/

mkdir d

2. 

touch .htaccess

vi .htaccess #写入:

<Files *> Options Indexes </Files>

 3. 测试

保存后,访问文件夹,此文件夹中文件都可以显示了:

apache显示目录文件列表的更多相关文章

  1. java显示目录文件列表和删除目录

    */ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...

  2. tomcat 显示目录文件列表

    conf/web.xml中,listings改为true,重启 http://liusu.iteye.com/blog/794613 <servlet> <servlet-name& ...

  3. 禁止apache显示目录索引的常见方法(apache禁止列目录)

    禁止Apache显示目录索引,禁止Apache显示目录结构列表,禁止Apache浏览目录,这是网上提问比较多的,其实都是一个意思.下面说下禁止禁止Apache显示目录索引的常见的3种方法. 要实现禁止 ...

  4. 禁止apache显示目录索引 apache禁止列目录

    禁止Apache显示目录索引的常见的3种方法. 要实现禁止Apache显示目录索引,只需将Option中的Indexes去掉即可. 禁止Apache显示目录索引,禁止Apache显示目录结构列表,禁止 ...

  5. 禁止Apache显示目录索引的常见方法

    禁止Apache显示目录索引,禁止Apache显示目录结构列表,禁止Apache浏览目录,这是网上提问比较多的,其实都是一个意思.下面说下禁止禁止Apache显示目录索引的常见的3种方法. 要实现禁止 ...

  6. Apache显示目录列表及icons目录的问题

    今天想部署下开源项目pig,发现它的mysql需要5.7.8 +,为了能支持多个版本并且可以方便切换,所以选择了phpstudy_pro 刚开始Apache不支持目录访问 修改配置 <Virtu ...

  7. 显示目录文件命令 - ls

    1) 命令名称:ls 2) 英文原意:list 3) 命令所在路径:/bin/ls 4) 执行权限:所有用户 5) 功能描述:显示目录文件 6) 语法: ls 选项[-ald][文件或目录] -a 显 ...

  8. Java学习-042-获取目录文件列表(当前,级联)

    以下三个场景,在我们日常的测试开发中经常遇到: 软件自动化测试,在进行参数测试时,我们通常将所有相似功能的参数文件统一放在一个目录中,在自动化程序启动的时候,获取资源参数文件夹中所有参数文件,然后解析 ...

  9. Linux显示只显示目录文件

    Linux显示只显示目录文件 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ls -l -d */ drwxr-xr-x 2 root root 4096 1 ...

随机推荐

  1. 3D舞台实现

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  2. 蜗牛慢慢爬 LeetCode 22. Generate Parentheses [Difficulty: Medium]

    题目 Given n pairs of parentheses, write a function to generate all combinations of well-formed parent ...

  3. Linux命令(二十) 显示系统内存状态 free

    一.命令简介 free 命令会显示内存的使用情况,包括实体内存,虚拟的交换文件内存.共享内存区段,以及系统核心使用的缓冲区等. 二.参数说明 -b 以Byte为单位显示内存使用情况 -K 以KB为单位 ...

  4. [51CTO]区块链在美国:10个案例、10个问题和5个解决方案

    区块链在美国:10个案例.10个问题和5个解决方案 近日,美国国际战略研究中心(CSIS, Center for Strategic and International Studies)发布报告< ...

  5. Bootstrap中datetimepicker日期控件1899年问题解决

    Bootstrap中datetimepicker日期控件1899年问题解决 最近在开发项目的过程中,遇到一个很尴尬的问题.我们项目一直采用的是angular+bootstrap,日期控件用的是boot ...

  6. IOS中@property的属性weak、nonatomic、strong、readonly等介绍

    iOS开发中@property的属性weak nonatomic strong readonly等介绍 //property:属性://synthesize:综合; @property与@synthe ...

  7. 安装及调试 Mavem Web

    一  使用Mavem eclipse菜单栏,找到file-->new -->other 然后找到Maven Project 然后next. 接着,选择maven-archetype-web ...

  8. Spring Shell打Jar包时需要注意的地方

    Spring-Shell打Jar包时需要注意的地方:   1.Main-Class spring-shell项目打Jar包的一个必要条件就是,指定Main-Class为org.springframew ...

  9. eclipse 安装报错

    14 11:17:13] ERROR: org.eclipse.equinox.p2.transport.ecf code=1002 Unable to read repository at http ...

  10. CRM 常用SQL 脚本

    1. 查询角色.用户 SELECT DISTINCT DomainName,        u.FullName ,         u.FirstName,         u.InternalEM ...