首页 » 网站推广 » phphttpd关系技巧_PHP情形搭建httpd2423设备安装

phphttpd关系技巧_PHP情形搭建httpd2423设备安装

访客 2024-12-14 0

扫一扫用手机浏览

文章目录 [+]

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

2.解压

phphttpd关系技巧_PHP情形搭建httpd2423设备安装

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

phphttpd关系技巧_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做事器配置完成。

标签:

相关文章

大数据时代的病态,数据膨胀背后的隐忧

随着互联网技术的飞速发展,大数据时代已经到来。大数据被誉为“21世纪的石油”,各行各业都在积极拥抱这一趋势。在数据膨胀的背后,一系...

网站推广 2024-12-16 阅读0 评论0

大数据时代的稳定与未来展望

随着互联网技术的飞速发展,大数据时代已经来临。大数据在各个领域的应用越来越广泛,为我们的生活带来了诸多便利。大数据的稳定性和安全性...

网站推广 2024-12-16 阅读0 评论0