php环境mysql 5.5安装教程_win7(64位)php5.5-Apache2.4-mysql5.6环境安装
2、然后对http.conf(D:\phpEnv\Apache24\conf\http.conf)配置文件进行修改-使用记事本打开就行
(1)修改ServerRoot Apache的根路径:
(37行)ServerRoot"c:/Apache24"改成=>ServerRoot "D:/phpEnv/Apache24"
(2)修改ServerName你的主机名称:
(217行)ServerNamewww.example.com:80将前面的#去掉,该属性在从命令行启动Apache时需要用到。
(3)修改DocumentRoot Apache访问的主文件夹目录,就是php、html代码文件的位置。Apache默认的路径是在htdocs(D:\phpEnv\Apache24\htdocs)下面,里面会有个简单的入口文件index.html。这个路径可以自己进行修改,我这里将其配置在我自己新建的文件夹www(D:\phpEnv\www)下。
(247行) DocumentRoot "c:/Apache24/htdocs"
改为=>
DocumentRoot "D:\phpEnv\www"
(4)修改入口文件配置:DirectoryIndex一般情况下我们都是以index.php、index.html、index.htm作为web项目的入口。Apache默认的入口只有index.html需要添加其他两个的支持,当然这个入口文件的设置可以根据自己的需要增减,如果要求比较严格的话可以只写一个index.php,这样在项目里面的入口就只能是index.php
(274行)
DirectoryIndexindex.html
改为=>
DirectoryIndex index.php index.htm index.html
(5)设定serverscript的目录:
(358行)ScriptAlias/cgi-bin/ "c:/Apache24/cgi-bin/"改为=> ScriptAlias/cgi-bin/ "D:/phpEnv/Apache24/cgi-bin"
(6)(380行)
AllowOverride None
Options None
Require all granted
改为=>
AllowOverride None
Options None
Require all granted