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:443
no listening sockets available, shutting down
Unable to open logs
[FAILED]
查了后发现说是端口被占用
然后查看占用端口的进程,kill掉即可
netstat -lnp|grep 443
tcp 0 0 :::443 :::* LISTEN 1407/python
udp 0 0 :::443 :::* 1407/python
kill -9 1407
[root@host ~]# service httpd start
Starting httpd: [ OK ]