首页 » 网站建设 » httpd支撑php设置装备摆设技巧_PHP情形搭建httpd2423设备安装

httpd支撑php设置装备摆设技巧_PHP情形搭建httpd2423设备安装

访客 2024-11-09 0

扫一扫用手机浏览

文章目录 [+]

我从https://www.apachelounge.com/下载的安装包httpd-2.4.23-win64-VC14.zip

2.解压

httpd支撑php设置装备摆设技巧_PHP情形搭建httpd2423设备安装

我解压在D盘,文件目录如下

httpd支撑php设置装备摆设技巧_PHP情形搭建httpd2423设备安装
(图片来自网络侵删)

3.修正配置文件httpd.conf

修正Apache24->conf下的httpd.conf

①修正ServerRoot的根路径:

ServerRoot \公众c:/Apache24\"大众

改为

ServerRoot \公众d:/Apache24\"大众

②修正ServerName你的主机名称:

#ServerName www.example.com:80

改为

ServerName www.example.com:80

③修正DocumentRoot访问的主文件夹目录

DocumentRoot \"大众c:/Apache24/htdocs\公众

<Directory \公众c:/Apache24/htdocs\公众>

改为

DocumentRoot \公众d:/www\"大众

<Directory \公众d:/www\"大众>

我在D盘创建了名为www的文件夹,用于存放php运用程序的,相称于wamp集成开拓环境中的www文件夹 ④修正入口文件DirectoryIndex

DirectoryIndex index.html

改为

DirectoryIndex index.php index.html index.htm

⑤设定ScriptAlias的目录:

ScriptAlias /cgi-bin/ \"大众c:/Apache24/cgi-bin/\"大众

改为

ScriptAlias /cgi-bin/ \"大众d:/Apache24/cgi-bin/\"大众

⑥修正CGI directory

<Directory \"大众c:/Apache24/cgi-bin\公众>

AllowOverride None

Options None

Require all granted

</Directory>

改为

<Directory \"大众d:/Apache24/cgi-bin\"大众>

AllowOverride None

Options None

Require all granted

</Directory>

4.安装Apache24做事

以管理员身份运行cmd,并切换到Apache24的bin目录

输入

httpd.exe -k install -n \"大众Apache24\"大众

cmd命令输入services.msc

这时候httpd已经篇日志完成。

5.测试Apache

打开Apache24做事,将Apache24下htdocs中的index.html文件复制到www目录下。

打开浏览器,在地址栏中输入localhost/index.html回车

这是Apache做事器配置完成。

标签:

相关文章

微信第三方登录便捷与安全的完美融合

社交平台已成为人们日常生活中不可或缺的一部分。微信作为我国最受欢迎的社交软件之一,拥有庞大的用户群体。为了方便用户在不同平台间切换...

网站建设 2025-02-18 阅读0 评论0

广东高速代码表解码高速公路管理智慧

高速公路作为国家交通动脉,连接着城市与城市,承载着巨大的物流和人流。广东作为我国经济大省,高速公路网络密布,交通流量巨大。为了更好...

网站建设 2025-02-18 阅读0 评论0