1、下载 http://apache.dataguru.cn//httpd/binaries/win32/httpd-2.2.25-win32-x86-openssl-0.9.8y.msi
2、保存在并重命名httpd.msi 放在F:盘
3、msiexec /a "F:\httpd.msi" /qb TARGETDIR="F:\apachetmp"
4、F:\apachesss\program files\Apache Software Foundation下Apache2.2拷贝到F盘根目录并命名为apache
5、cmd 运行 F:\apache\bin\httpd.exe
错误:httpd.exe: Could not open configuration file F:/apache/conf/httpd.conf: \xcf\xb5\xcd\xb3\xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xce\xc4\xbc\xfe\xa1\xa3
解决:创建F:\apache\conf\httpd.conf
6、cmd 运行 F:\apache\bin\httpd.exe
错误:httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.108 for ServerName no listening sockets available, shutting
down Unable to open logs
解决:F:\apache\conf\httpd.conf 添加 ServerName localhost
7、cmd 运行 F:\apache\bin\httpd.exe
错误:no listening sockets available, shutting down Unable to open logs
解决:F:\apache\conf\httpd.conf 添加 Listen localhost:80
8、cmd 运行 F:\apache\bin\httpd.exe
错误:(OS 3)系统找不到指定的路径。 : httpd.exe: could not open error log file F:/apache/logs/error.log. Unable to open logs
解决:创建F:\apache\logs\error.log
9、cmd 运行 F:\apache\bin\httpd.exe
10、浏览器 http://localhost/
问题:Not Found The requested URL / was not found on this server.
解决:1、查看F:\apache\logs\error.log 发现 Attempt to serve directory: F:/apache/htdocs/
2、F:\apache\conf\httpd.conf 添加 DocumentRoot "F:/www" 并在 F:/www目录里面创建 index.html
10、浏览器 http://localhost/index.html