(1)修改ServerRoot Apache的根路径:
第37行 修改为ServerRoot "D:/amp/Apache24"
(2)修改ServerName你的主机名称:
将219行 ServerName :80前面的#去除掉
(3)修改DocumentRoot Apache访问的主文件夹目录,也就是php、html代码文件的位置。Apache默认的路径是在htdocs(D:\amp\Apache24\htdocs)下面,里面有个index.html。这个路径是默认的,大家也可以做修改。我将它配置在刚刚修改的文件下D:\amp\www。
修改243行 244
DocumentRoot "D:/amp/www"
(4)修改入口文件配置:Apache默认的入口只有index.html,但是我们一般情况下是以index.php、index.html、index.htm作为web项目的入口,所以我们还需要添加htm,php作为入口。
277行修改为 DirectoryIndex index.php index.htm index.html
(5)设定serverscript的目录:
360行 ScriptAlias /cgi-bin/ "D:/amp/Apache24/cgi-bin/"
(6) 376行修改为