今天想部署下开源项目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