win10配置apache

Posted iiiLISA

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了win10配置apache相关的知识,希望对你有一定的参考价值。

1、下载Apache
首先下载文件,点击下载
2、安装Apache
我的路径 D:\\Apache24

打开D:\\Apache24\\conf目录下的httpd.conf文件

修改ServerRoot

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
Define SRVROOT "D:/Apache24"
ServerRoot "${SRVROOT}"

修改端口号Listen 8080

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8080

修改ServerName处对应的端口号

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName www.example.com:8080

3、安装Apache

管理员身份
依次执行

cmd
d:
cd D:\\Apache24\\bin
httpd.exe -k install -n "Apache24"
net start Apache24


4、测试是否安装成功
浏览器中输入http://localhost:8080/index.html

以上是关于win10配置apache的主要内容,如果未能解决你的问题,请参考以下文章

win10下关于apache配置虚拟主机

win10 安装Apache服务器,以及配置本地项目

win10 apache配置虚拟主机后localhost无法使用

Win10下Appach配置

win10下maven的安装与配置

php7+apache2.4 配置环境(参考之前其他博主实验成功,win7 or win10实验成功)