参考:
下载:Apache httpd和php
1. Apache官网http://www.apache.org/没有httpd的windows系统的二进制包,因此去这里下载:https://www.apachelounge.com/download/
2. PHP去官网下载即可:http://www.php.net/downloads.php
安装:
步骤一: 把下载到的httpd-2.4.26-Win64-VC15.zip压缩包解压,修改httpd的配置文件,打开解压后目录的Apache24\conf\httpd.conf文件,进行以下修改:
1) 把默认的目录"c:/Apache24"改为自己相应的目录,主要有:
ServerRoot "c:/Apache24"
ServerAdmin改不改无所谓;
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
DirectoryIndex index.html改为DirectoryIndex index.html index.php index.htm //支持更多的默认页
ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"
<Directory "c:/Apache24/cgi-bin">
2)
3)
步骤二:把httpd安装成服务以及启动服务,可参考官网: http://httpd.apache.org/docs/2.4/platform/windows.html
安装php