$ sudo /etc/init.d/nginx status ● nginx.service - nginx - high performance web server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-12-08 09:51:20 UTC; 18s ago Docs: http://nginx.org/en/docs/ Process: 15032 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Main PID: 15033 (nginx) Tasks: 2 (limit: 4591) Memory: 1.7M CGroup: /system.slice/nginx.service ├─15033 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf └─15034 nginx: worker process
Dec 08 09:51:20 baoguoxiao systemd[1]: Starting nginx - high performance web server... Dec 08 09:51:20 baoguoxiao systemd[1]: Started nginx - high performance web server.
$ sudo /etc/init.d/nginx configtest nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful