Nginx启动出现 localhost.localdomain systemd[1]: Starting nginx - high performance ...问题

CentOS7启动Nginx不了:
[root@localhost ~]# systemctl start nginx.service
[root@localhost ~]# systemctl status nginx.service
nginx.service - nginx - high performance web server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled)
Active: active (running) since 四 2019-10-17 08:14:33 CST; 10min ago
Docs: http://nginx.org/en/docs/
Process: 3074 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Process: 3072 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Main PID: 3076 (nginx)
CGroup: /system.slice/nginx.service
├─3076 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
└─3077 nginx: worker process

10月 17 08:14:33 localhost.localdomain systemd[1]: Starting nginx - high performance …
10月 17 08:14:33 localhost.localdomain nginx[3072]: nginx: the configuration file /et…k
10月 17 08:14:33 localhost.localdomain nginx[3072]: nginx: configuration file /etc/ng…l
10月 17 08:14:33 localhost.localdomain systemd[1]: Started nginx - high performance w…
10月 17 08:15:56 localhost.localdomain systemd[1]: Started nginx - high performance w…
10月 17 08:16:53 localhost.localdomain systemd[1]: Started nginx - high performance w…
10月 17 08:24:42 localhost.localdomain systemd[1]: Started nginx - high performance w…
Hint: Some lines were ellipsized, use -l to show in full.

出现以上情况导致网站访问不了,可以从防火墙方面找问题
可以关闭防火墙systemctl stop firewalld 或者使用最暴力的方法,iptables -F清除策略。就可以访问啦。


你可能感兴趣的:(Linux,nginx)