开发者社区> 问答> 正文

centos7.2安装完一键LNMP公网IP仍然不能访问

输入:systemctl start nginx
报错:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

输入:systemctl status nginx.service
输出的信息是:
● nginx.service - LSB: starts the nginx web server
Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-05-22 10:31:00 CST; 1s ago

 Docs: man:systemd-sysv-generator(8)

Process: 15532 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)

May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z systemd[1]: Starting LSB: starts the nginx web server...
May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z nginx[15532]: Starting nginx... nginx (pid 15467 15466) already ...ng.
May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z systemd[1]: nginx.service: control process exited, code=exited s...s=1
May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z systemd[1]: Failed to start LSB: starts the nginx web server.
May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z systemd[1]: Unit nginx.service entered failed state.
May 22 10:31:00 iZuf69lc6nd4b4dpp4r982Z systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

小白一个,实在不知道出错在哪。
我也试过单独安装nginx,但结果一样公网IP不能访问

展开
收起
恶魔高达 2017-05-22 10:37:51 5453 0
1 条回答
写回答
取消 提交回答
  • 这个访问不了是因为nginx服务没有正常启动,从这个日志里没有给出具体的问题。
    你可以尝试下centos 7.2下关闭selinux 再尝试一次部署

    vi /etc/selinux/config

    设置SELINUX=disabled
    重启服务器

    2019-07-17 21:12:18
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载