1、在command窗口执行d:\http2215x64\bin\httpd -k install
(如果是win7使用管理员身份运行command窗口)
这步主要是安装服务,安装后会有test httpd.conf的检查,检查会有一些配置文件不正确的提示,按照第二步中的内容修改即可。
2、修改httpd.conf文件
1)、ServerRoot "/httpd-2.2-x64"
改成:ServerRoot "d:\httpd2215x64"
2)、DocumentRoot "/httpd-2.2-x64/htdocs"
改成:DocumentRoot "d:\httpd2215x64\htdocs"
3)、<Directory "/httpd-2.2-x64/htdocs">
改成:<Directory "d:\httpd2215x64\htdocs">
3、httpd的启动和停止命令
启动:httpd -k start
停止:httpd -k stop
最后在浏览器中输入http://localhost/ 就能看到it works!的提示了:)。
如果没有出现,反而出现了错误信息:You don't have permission to access / on this server.找到这里:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
然后去掉最后两行:Order deny,allow;Deny from all,就work了。
(如果是win7使用管理员身份运行command窗口)
这步主要是安装服务,安装后会有test httpd.conf的检查,检查会有一些配置文件不正确的提示,按照第二步中的内容修改即可。
2、修改httpd.conf文件
1)、ServerRoot "/httpd-2.2-x64"
改成:ServerRoot "d:\httpd2215x64"
2)、DocumentRoot "/httpd-2.2-x64/htdocs"
改成:DocumentRoot "d:\httpd2215x64\htdocs"
3)、<Directory "/httpd-2.2-x64/htdocs">
改成:<Directory "d:\httpd2215x64\htdocs">
3、httpd的启动和停止命令
启动:httpd -k start
停止:httpd -k stop
最后在浏览器中输入http://localhost/ 就能看到it works!的提示了:)。
如果没有出现,反而出现了错误信息:You don't have permission to access / on this server.找到这里:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
然后去掉最后两行:Order deny,allow;Deny from all,就work了。