![无法启动或停止 httpd](https://linux22.com/image/112819/%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%E6%88%96%E5%81%9C%E6%AD%A2%20httpd%20.png)
[root@ap-dcr-splm53 ~]# su - x3ds
[x3ds@ap-dcr-splm53 ~]$ service httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]
:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[x3ds@ap-dcr-splm53 ~]$ su - root
Password:
[root@ap-dcr-splm53 ~]# cd /var/run/httpd
[root@ap-dcr-splm53 httpd]# ls
[root@ap-dcr-splm53 httpd]#
我正在尝试开始httpd
,但它不允许我。我试图找到该文件httpd.pid
,但它没有显示,尽管它存在。我该如何解决这个问题?
答案1
您正尝试以非 root 用户身份启动守护程序。尝试绑定到端口号 1024 及更少的端口号需要 root。
尝试以 root 身份启动服务:
sudo service httpd start