解决apache启动错误"httpd:Could not reliably determine

简介: <p style="padding-top:0px; padding-bottom:0px; margin-top:0px; margin-bottom:0px; clear:both; height:auto; overflow:hidden; color:rgb(85,85,85); font-family:宋体,'Arial Narrow',arial,serif; line-hei

启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name

[root@server httpd-2.2.4]# /usr/local/apache/bin/apachectl start

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

1)进入apache的安装目录:(视个人安装情况而不同)
[root@server ~]# cd /usr/local/apache/conf
2)编辑httpd.conf文件,搜索"#ServerName",添加 ServerName localhost:80
[root@server conf]# ls
extra  httpd.conf  magic  mime.types  original
[root@server conf]# vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80
3)再重新启动apache 即可。
[root@server ~]# /usr/local/apache/bin/apachectl restart
目录
相关文章
|
4月前
|
Linux 网络安全 Apache
Centos下操作Apache httpd
Centos下操作Apache httpd
69 0
|
人工智能 网络协议 安全
Apache(httpd)的简介、安装以及如何使用(上)
Apache(httpd)的简介、安装以及如何使用(上)
455 0
Apache(httpd)的简介、安装以及如何使用(上)
|
27天前
|
Shell Linux 网络安全
【Shell 命令集合 网络通讯 】Linux 管理Apache HTTP服务器 httpd命令 使用指南
【Shell 命令集合 网络通讯 】Linux 管理Apache HTTP服务器 httpd命令 使用指南
29 0
|
7月前
|
缓存 网络协议 PHP
httpd和apache
httpd和apache
39 0
|
关系型数据库 MySQL 应用服务中间件
在Centos7上将Apache(httpd)切换为Nginx的过程记录
近期要上线几个基于tornado+motor的移动端接口服务,众所周知,Apache和tornado天生八字不合,尤其apache对python3尤为的不友好,tornado和nginx才是木石前盟,另外由于apache目前系统占用确实比较高,不光进程数多,httpd竟然占用了200多M,太庞大,决定换为较轻量级,高并发的nginx。
在Centos7上将Apache(httpd)切换为Nginx的过程记录
|
安全 Apache
CVE-2021-42013 Apache HTTPd 2.4.49 2.4.50 路径穿越以及RCE漏洞
影响版本 Apache 2.4.49 Apache 2.4.50 当前描述 发现Apache HTTP Server 2.4.50中对CVE-221-41773的修复不足。攻击者可以使用路径遍历攻击将URL映射到Alias类指令配置的目录之外的文件。如果这些目录之外的文件不受通常默认配置“要求全部拒绝”的保护,这些请求可能会成功。如果还为这些别名路径启用了CGI脚本,这可能允许远程代码执行。此问题仅影响Apache 2.4.49和Apache 2.4.50,而不影响早期版本。 环境搭建可以查看我的上一篇文章 https://developer.aliyun.com/article/11136
296 0
CVE-2021-42013 Apache HTTPd 2.4.49 2.4.50 路径穿越以及RCE漏洞
|
网络协议 安全 Apache
Apache(httpd)的简介、安装以及如何使用(下)
Apache(httpd)的简介、安装以及如何使用(下)
210 0
Apache(httpd)的简介、安装以及如何使用(下)
|
安全 网络协议 算法
RH358配置Web服务器--使用 Apache HTTPD 配置 HTTPS
RH358配置Web服务器--使用 Apache HTTPD 配置 HTTPS
211 0
RH358配置Web服务器--使用 Apache HTTPD 配置 HTTPS
|
安全 网络协议 网络安全
RH358配置Web服务器--使用 Apache HTTPD 对虚拟主机进行配置和故障排除
RH358配置Web服务器--使用 Apache HTTPD 对虚拟主机进行配置和故障排除
188 0
RH358配置Web服务器--使用 Apache HTTPD 对虚拟主机进行配置和故障排除

热门文章

最新文章

推荐镜像

更多