转自:http://www.cnblogs.com/sq45711478/p/6368833.htmlphp
首先下载所需软件:html
PHP:http://windows.php.net/download(下载线程安全版的,即Thread Safe)windows
1.安装并配置Apache安全
Apache版本:Apache2.4.16服务器
解压目录:D:\PHP\Apache24app
安装Apache2.4.16,vc14版本的,须要先安装Visual C++ Redistributable for Visual Studio 2015运行库;vc11版本的,须要先安装Visual C++ Redistributable for Visual Studio 2012运行库
(1).下载回来的是解压文件,解压好放到要安装的位置。
(2).打开Apache24\conf下httpd.conf 文件,修改如下关键位置:
ServerRoot “D:/PHP/Apache24”(即Apache的安装位置);
DocumentRoot “D:/PHP/Apache24/htdocs” (Apache默认的网站根目录,可根据本身的 喜爱调整)
修改根目录的选项:
修改前
Options Indexes FollowSymLinks
AllowOverride null
Require all granted
修改后
Options Indexes FollowSymLinks
AllowOverride All
Require all granted