启动nginx出现错误

[root@localhost ~]# service nginx start

Redirecting to /bin/systemctl start  nginx.service

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

 

cd /etc/sysconfig/network-scripts/

修改网卡

BOOTPROTO=static

IPADDR=10.1.3.43

NETMASK=255.255.255.0

GATEWAY=10.1.1.254

DNS=114.114.114.114

NM_CONTROLLED=no

……

ONBOOT=yes

 

service network restart

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled

setenforce 0

systemctl stop firewalld.service

systemctl disable firewalld.service

 

nginx -t

nginx -s stop

systemctl start nginx.service

nginx -s reload

均成功

星期二, 02/04/2020 - 13:05 — 杨超