|
시작
$ sudo systemctl start nginx
상태 확인 $ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-10-17 00:43:36 UTC; 7min ago
Docs: man:nginx(8)
Process: 14797 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run
Process: 14808 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, stat
Process: 14799 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exi
Main PID: 14811 (nginx)
Tasks: 3 (limit: 2325)
CGroup: /system.slice/nginx.service
├─14811 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─14824 nginx: worker process
└─14825 nginx: worker process
중지 $ sudo systemctl stop nginx
설정 파일 테스트
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
* 설정이 정상적이라면 위 메세지를 확인할 수 있다.
|