Nginx 和 Apache 开启目录浏览功能
2016-03-12 14:12
801 查看
1.Nginx
在相应项目的 Server 段中的 location 段中,添加 autoindex on。例如:
2.Apache
在 http.conf 中加入如下代码(以 d:/wamp/www/practise 目录为例):
或
参考:
启用apache目录浏览功能
在相应项目的 Server 段中的 location 段中,添加 autoindex on。例如:
server { listen 80; server_name www.dee.practise.com; location /{ root html/practise; #index index.php; autoindex on; } location ~ \.php$ { #root html; root html/practise; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } access_log /home/wwwlogs/practise/access.log access; }
2.Apache
在 http.conf 中加入如下代码(以 d:/wamp/www/practise 目录为例):
<Directory "d:/wamp/www/practise"> #开启目录列表索引模式 Options Indexes Order allow,deny IndexOptions NameWidth=25 Charset=UTF-8 Allow from all </Directory>
或
<Directory />"d:/wamp/www/practise" #开启目录列表索引模式 Options Indexes Order allow,deny IndexOptions NameWidth=25 Charset=UTF-8 Allow from all </Directory>
参考:
启用apache目录浏览功能
相关文章推荐
- Nginx配置
- nginx1.6.3源码安装,centos6系统下详解
- Nginx 出现403 forbidden错误的设置方法!
- Nginx 单IP绑定多域名配置 顶级域名重定向到www域名
- NGINX配置rtmp服务器实现rtmp以及hls直播
- Keeplived配置Nginx双机高可用
- 在CentOS7中安装nginx
- Nginx配置文件简单说明log_format
- NGINX server配置中if的用法
- NGINX做前端,页面上的连接却变成后端地址
- nginx 域名映射
- django在nginx uwsgi和tornado异步方案在项目中的体验
- Nginx安装到使用__me
- 用GoAccess分析Nginx的日志
- ubunto nginx 本地域名劫持与虚拟机配置
- CentOS 7虚拟机下模拟实现nginx负载均衡
- nginx+php+mysql+centos
- nginx 配置
- goaccess分析nginx日志常见问题
- nginx源码初读(12)--跟main一起看流程(Block 1: 初始化基础模块 Block 2:获取参数)