- 下载Apache
- 修改tttp.conf文件
- 命令安装http服务
- (解决问题Could not reliably determine the server’s fully qualified domain name, using fe80::d558:4c0:68e3:fdd1. Set the ‘ServerName’ directive globally to suppress this message)
- 查看是否安装成功
1.下载链接
https://www.apachelounge.com/download/VC11/
将压缩包解压到某盘,我的是E盘,找到Apache24这个目录的路径,等会儿要用,我的是安装路径是E:\httpd-2.4.38-win64-VC11\Apache24
2.修改http.conf文件
修改Apache24/conf/目录下的httpd.conf文件,记事本打开就可以
修改内容:
将" "中的路径改为自己的安装目录路径,也就是Apache24的路径,注意是这个斜杠“/”
修改端口号,可以不修改,如果后面提示端口被占用启动不来httpd服务则可以选择修改这个端口号,或者停止占用80端口的服务。我这里不修改,默认80。
将这个语句注释掉
3.命令安装http服务
管理员运行cmd
先切换到Apache24/bin目录,输入命令httpd.exe -k install -n apache安装httpd服务
-n apache是命名服务名为apache,后面启动服务就用这个名字
Errors reported here must be corrected before the service can be started.这句话的意思是:如果这句话后面没有内容则表示安装成功,到第5步启动服务就可以了,后面有内容则为出现的错误。
4.解决问题Could not reliably determine the server’s fully qualified domain name, using xxxx:xxxx:xxxx:ffff:68e3:fdd1. Set the ‘ServerName’ directive globally to suppress this message
打开网易翻译这段话。。。
无法使用xxx::xxx:xxx:xxx3:xxx1可靠地确定服务器的完全限定域名。全局设置’ServerName’指令来禁止此消息
在httpd.conf文件加上这句ServerName localhost:80
重新执行命令httpd.exe -k install -n apache
5.查看是否安装成功
启动服务
右击计算机选择管理,查看服务
也可在浏览器输入localhost:80地址查看
Windows安装Apache(解决问题Set the 'ServerName' directive globally to suppress this message)
最新推荐文章于 2024-05-17 11:38:04 发布