输入: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不能访问
这个访问不了是因为nginx服务没有正常启动,从这个日志里没有给出具体的问题。
你可以尝试下centos 7.2下关闭selinux 再尝试一次部署
设置SELINUX=disabled
重启服务器
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。