Linux Apache 启动时错误httpd: apr_sockaddr_info_get() failed for host.localdomain解决记录

来源:互联网 发布:网络出版物是什么 编辑:程序博客网 时间:2024/05/16 08:37

问题如图

Apache启动的时候一直出这个问题,去网上查了后,发现需要修改httpd.conf文件,把ServerName那修改下,把ServerName 处的www.example.com:80,修改成ip xxx.xxx.xxx.xxx:80即可

修改后,在service httpd start,又出问题:

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:443(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443no listening sockets available, shutting downUnable to open logs                                                           [FAILED]

查了后发现说是端口被占用

然后查看占用端口的进程,kill掉即可

netstat -lnp|grep 443tcp        0      0 :::443                      :::*                        LISTEN      1407/python         udp        0      0 :::443                      :::*                                    1407/python     
kill -9 1407
[root@host ~]# service httpd startStarting httpd:                                            [  OK  ]
阅读全文
0 0