php html 目录列表,Apache显示目录列表及icons目录的问题

今天想部署下开源项目pig,发现它的mysql需要5.7.8 +,为了能支持多个版本并且可以方便切换,所以选择了phpstudy_pro

刚开始Apache不支持目录访问

修改配置

DocumentRoot"D:/WWW"FcgidInitialEnv PHPRC"D:/phpstudy_pro/Extensions/php/php7.3.4nts"AddHandler fcgid-script .php

FcgidWrapper"D:/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe".phpOptions Indexes FollowSymLinks ExecCGI

AllowOverride All

Order allow,deny

Allow from all

Require all granted

DirectoryIndex index.php index.html

关键: Indexes显示目录

添加后发现

搜索了下Apache的配置目录conf,发现在conf/original/extra/httpd-autoindex.conf,将下面的都注释掉

#Alias /icons/ "${SRVROOT}/icons/"## Options Indexes MultiViews

# AllowOverride None

# Require all granted

##

# AddIcon* directives tell the server which icon to show fordifferent

# files or filename extensions. These are only displayedfor# FancyIndexed directories.

#

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

#AddIconByType (TXT,/icons/text.gif) text/*#AddIconByType (IMG,/icons/image2.gif) image/*

#AddIconByType (SND,/icons/sound2.gif) audio/*

#AddIconByType (VID,/icons/movie.gif) video/*

#AddIcon /icons/binary.gif .bin .exe

#AddIcon /icons/binhex.gif .hqx

#AddIcon /icons/tar.gif .tar

#AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv

#AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip

#AddIcon /icons/a.gif .ps .ai .eps

#AddIcon /icons/layout.gif .html .shtml .htm .pdf

#AddIcon /icons/text.gif .txt

#AddIcon /icons/c.gif .c

#AddIcon /icons/p.gif .pl .py

#AddIcon /icons/f.gif .for

#AddIcon /icons/dvi.gif .dvi

#AddIcon /icons/uuencoded.gif .uu

#AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl

#AddIcon /icons/tex.gif .tex

#AddIcon /icons/bomb.gif core

#AddIcon /icons/back.gif ..

#AddIcon /icons/hand.right.gif README

#AddIcon /icons/folder.gif ^^DIRECTORY^^

#AddIcon /icons/blank.gif ^^BLANKICON^^

重启Apache

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值