·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> php网站开发 >> Windows安装Apache2.4和PHP5.6

Windows安装Apache2.4和PHP5.6

作者:佚名      php网站开发编辑:admin      更新时间:2022-07-23
Windows安装Apache2.4和php5.6

VC11 下载安装http://www.microsoft.com/en-us/download/details.aspx?id=30679

=================

PHP(5.6) VC11 x86 Thread Safephp-5.6.4-Win32-VC11-x86.zip

下载地址:http://windows.php.net/download/

解压并建立php.ini文件

=================

Apache(2.4)httpd-2.4.10-win32-VC11.zip

下载地址:http://www.apachelounge.com/download/手册下载:http://mirror.bit.edu.cn/apache/httpd/docs/

解压,示例目录(E:/WAMP)

修改主配置文件:conf/http.conf

ServerRoot "E:/WAMP/Apache"ServerName desktopDocumentRoot "E:/WWW"<Directory "E:/WWW">DirectoryIndex index.html index.php<Directory "E:/WAMP/Apache/cgi-bin">Include conf/extra/httpd-vhosts.conf

#关联PHPLoadModule php5_module E:/WAMP/PHP/php5apache2_4.dllAddType application/x-httpd-php .phpPHPIniDir "E:/WAMP/PHP"

修改虚拟主机配置文件:conf/extra/httpd-vhosts.conf

<VirtualHost *:80>  ServerName desktop  DocumentRoot "C:/Users/Administrator/Desktop"  <Directory "C:/Users/Administrator/Desktop">    Options Indexes FollowSymLinks    AllowOverride FileInfo  </Directory></VirtualHost>

添加系统服务:httpd.exe -k install -n "Apache24"卸载系统服务:httpd.exe -k uninstall -n "Apache24"