apache2.4配置

首先PHP5.5.12要下载线程安全的版本。因为不安全的版本里面没有php5apache2_4.dll这个文件。

其次就是apache的服务器版本要从apache下载地址下载,具体的原因官方原文如下:

Please use the Apache builds provided byApache Lounge. They also provide VC11 builds of Apache for x86 and x64. We use their binaries to build the Apache SAPIs.

If you are using PHP with Apache 1 or Apache2 from apache.org (not recommended) you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. Do NOTuse VC9+ versions of PHP with the apache.org binaries.

With Apache you have to use the Thread Safe (TS) versions of PHP.

下载好后把所有的文件解压到同一文件夹中,首先配置apache:

1.ServerRoot "E:/WAMP/Apache";apache的解压地址

2.Listen 80:如果有IIS建议改成其他端口如8080

3.ServerAdmin example@gmail.com :输入一个邮箱地址

4.ServerName www.example.com:80:端口要和上面一致

5.<Directory />
    AllowOverride none
    Require all denied
</Directory>

6.DocumentRoot "E:/WAMP/WWW"
<Directory "E:/WAMP/WWW">:设置网页的主要目录

7.LoadModule php5_module "E:/WAMP/PHP/php5apache2_4.dll"
PHPIniDir "E:/WAMP/PHP"
AddType application/x-httpd-php .php .html .htm

8.加入主要的识别文件类型  DirectoryIndex ndex.html index.htm index.php

然后用管理员cmd运行bin下的httpd.exe 安装httpd.exe -k install -n "Apache24"



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值