linux - 中央操作系统 7 |无法启动 Apache

标签 linux apache centos

我在虚拟机上运行 CentOS 7 x86。 我已经安装了 Apache 并想启动它,但是如果我输入:

systemctl start httpd.service

它给我这个错误:

Job for httpd.service failed because the control process exited with error code. 
See "systemctl status httpd.service" and "journalctl -xe" for details.

当我输入时:

systemctl status httpd.service

它给了我 this error

当我输入时

journalctl -xe

它给了我 this error

请帮帮我。 :o

谢谢

最佳答案

我想你想映射端口 3221 以使用 apache,但你无权访问 selinux。

尝试这些解决方案的解决方案:

change listen option of /etc/httpd/conf/httpd.conf to 80 if 3221 is not important to you and restart httpd again

setsebool -P httpd_can_network_connect 1

并重新启动您的 httpd 服务。

sudo yum -y install policycoreutils-python

sudo semanage port -a -t http_port_t -p tcp 3221

并重新启动您的 httpd 服务。

我认为在用户从这些解决方案中找到解决方案后,您的问题就会解决。

关于linux - 中央操作系统 7 |无法启动 Apache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38283910/

相关文章:

mysql - 如何将Rails服务器设置为apache?

php - MySQL 查询(28K 行)使服务器过载

apache - 如何找到apache配置文件的路径

php - session 在 php/linux centos 中丢失

c++ - 您通常在哪里安装从源代码构建的库的调试版本?

python - 在python中查找所有linux文件的总目录

php - UTF-8贯穿始终

python - 如何增加使用 'timeout' 命令运行的进程的超时限制

html - 在 Apache JMeter 中不记录 html 样本

使用简单文件上传脚本时出现PHP错误: failed to open stream: No such file or directory