windows 下搭建Apache服务器

1、下载Apache服务器

httpd-2.4.59-240404-win64-VS17

2、安装

直接将httpd-2.4.59-240404-win64-VS17解压缩到C:盘跟目录下

3、配置

在C:\Apache24\conf路径下找到httpd.conf打开

修改如下几行

#修改下面两行
# "${SRVROOT}/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "${SRVROOT}/cgi-bin">
    #AllowOverride None
    #Options None
    AllowOverride All
    Options +ExecCGI
	Require all granted
</Directory>

#取消注释下面一行
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi

6、开启httpd服务

运行 C:\Apache24\bin\httpd.exe

退出Ctrl+C

5、测试

在浏览器下访问测试cgi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值