配置wamp

xiaoxiao2021-02-28  85

1)安装apache服务   去官网下载 php 和apache 都需要vc库支持  安装vc11 Apache24\conf下httpd.conf 文件,用记事本打开编辑作如下修改并保存 ServerRoot "c:/Apache24"改为ServerRoot “D:/Apache24”;//Apache程序的位置。 第204行的ServerAdmin改不改无所谓; 第213行ServerName前面的“#”号去掉; 第237行DocumentRoot "c:/Apache24/htdocs"改为DocumentRoot "D:/Apache24/htdocs";//网站的根目录 第238行<Directory "c:/Apache24/htdocs">改为<Directory " D:/Apache24/htdocs">; 第271行DirectoryIndex index.html改为DirectoryIndex index.html index.php index.htm   //支持更多的默认页 第354行 ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"改为ScriptAlias /cgi-bin/ "D:/Apache24/cgi-bin/" 第370行<Directory "c:/Apache24/cgi-bin">改为<Directory "D:/Apache24/cgi-bin"> 启动运行 输入cmd   进入D盘的apache中bin文件夹中  输入 httpd -k install 安装apache 输入 httpd -k start    启动apache 2)安装mysql 3)配置php 4)让apache支持php 编辑Apache的配置文件D:\Apache\conf\httpd.conf 找到LoadModule,在下面添加 LoadModule php5_module "D:/php/php5apache2_4.dll" PHPIniDir "D:/php/                                     (根据自己实际情况) 找到AddType application/x-compress .Z     AddType application/x-gzip .gz .tgz 添加AddType application/x-httpd-php .php     AddType application/x-httpd-php .html 添加系统变量 具体方法是,计算机>属性>高级系统属性>环境变量>系统变量>Path>编辑 在变量值的最后添加 ;D:\php;D:\php\ext   (根据实景情况改变) 重启后生效
转载请注明原文地址: https://www.6miu.com/read-51394.html

最新回复(0)