一、Apache的安装与配置
Apache官方网站www.apache.org
在右侧选择HTTP Server,选择最新版本下的Download,选择下载:
Win32 Binary without crypto (no mod_ssl) (MSI Installer):
apache_2.2.11-win32-x86-no_ssl.msi [PGP] [MD5]
安装完成后,到相应目录找到:
D:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
1.修改主目录
查找DocumentRoot,修改为存放Web文件的地址,有两处
2.连接PHP
查找ScriptAlias
在
ScriptAlias /cgi-bin/ "D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"
下添加
ScriptAlias /php/ "K:/PHP/"------------------注意此处的路径要以"/"结尾
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
3.添加默认文档
查找DirectoryIndex,添加默认文档
如:DirectoryIndex index.html index.php index.asp
注意,如果安装后出现You don´t have permission to access / on this server.
或者出现无法运行php文件的情况下
查找Deny from all改为Allow from all
启动服务,任务栏图标右键选择Open Apache Monitor
帝易企划
请联系您的客服获取工单提交地址:)