win7(64位)安装搭建php-5.5.10 apache2.4.7mysql-5.6.16 环境
php-5.5.10-Win32-VC11-x64.zip下载地址:
httpd-2.4.7-win64-VC11.zip下载地址:
mysql-5.6.16-winx64.zip下载地址:
一、安装配置Apache2.4.7(httpd-2.4.7-win64-VC11.zip)
1、解压下载的安装包:httpd-2.4.7-win64-VC11.zip将其放到自己的安装目录(我的目录D:\phpEnv\Apache24)
2、然后对http.conf(D:\phpEnv\Apache24\conf\http.conf)配置文件进行修改-使用记事本打开就行
(1)修改ServerRoot Apache的根路径:
(37行)ServerRootc:/Apache24改成=>ServerRoot D:/phpEnv/Apache24
(2)修改ServerName你的主机名称:
(217行)ServerName:80将前面的#去掉,该属性在从命令行启动Apache时需要用到。
(3)修改DocumentRoot Apache访问的主文件夹目录,就是php、html代码文件的位置。Apache默认的路径是在htdocs(D:\phpEnv\Apache24\htdocs)下面,里面会有个简单的入口文件index.html。这个路径可以自己进行修改,我这里将其配置在我自己新建的文件夹(D:\phpEnv\)下。
(247行)DocumentRoot c:/Apache24/htdocs
<Directoryc:/Apache24/htdocs>
改为=>
DocumentRoot D:\phpEnv\
<Directory D:\phpEnv\>
(4)修改入口文件配置:DirectoryIndex一般情况下我们都是以index.php、index.html、index.htm作为web项目的入口。Apache默认的入口只有index.html需要添加其他两个的支持,当然这个入口文件的设置可以根据自己的需要增减,如果要求比较严格的话可以只写一个index.php,这样在项目里面的入口就只能是index.php
(274行)<IfModuledir_module>
DirectoryIndexindex.html
</IfModule>
改为=>
<IfModuledir_module>
DirectoryIndex index.php index.htm index.html
</IfModule>
(5)设定serverscript的目录:
(358行)ScriptAlias/cgi-bin/ c:/Apache24/cgi-bin/改为=> ScriptAlias/cgi-bin/ D:/phpEnv/Apache24/cgi-bin
(6)(380行)
<Directoryc:/Apache24/cgi-bin>
AllowOverride None
Options None
Require all granted
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-35926-1.html
小米公关太牛逼了
储备黄金
说糟糕点的话虫子能密封不透气的袋子存活吗
联合国授权了吗