httpd启动报错
发布网友
发布时间:2022-11-20 15:05
我来回答
共1个回答
热心网友
时间:2024-10-23 07:31
报错:
解决方案:
查看80端口是否被占用
[root@web01 ~]# lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 6751 root 6u IPv4 35889 0t0 TCP *:http (LISTEN)
nginx 6752 www 6u IPv4 35889 0t0 TCP *:http (LISTEN)
可见被nginx占用,打开httpd配置文件修改端口
[root@web01 ~]# vim /etc/httpd/conf/httpd.conf
搜索Listen 改为8080
[root@web01 ~]# systemctl restart httpd
[root@web01 ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-21 00:14:38 CST; 6s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 8873 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Main PID: 8953 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─8953 /usr/sbin/httpd -DFOREGROUND
├─8954 /usr/sbin/httpd -DFOREGROUND
├─8955 /usr/sbin/httpd -DFOREGROUND
├─8956 /usr/sbin/httpd -DFOREGROUND
├─8957 /usr/sbin/httpd -DFOREGROUND
└─8958 /usr/sbin/httpd -DFOREGROUND
Oct 21 00:14:07 web01 systemd[1]: Starting The Apache HTTP Server...
Oct 21 00:14:17 web01 httpd[8953]: AH00558: httpd: Could not reliably determine the server's fully qualified dom...essage
Oct 21 00:14:38 web01 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
搞定!!!
注意:
再次访问一定要吧端口加进去,比如访问10.0.0.5:8080 中间的冒号一定是英文格式,不然访问不出