nginx ubuntu commonly used commands

1. Start

  (1) can be started directly input nginx

  (2)systemctl start nginx.service

  (3) whether the inquiry has been launched: PS the AUX | grep nginx, displayed in the following figure, said it had started:

    

2. Stop nginx

  (1) nginx -s stop immediately stop nginx

  Stop (2) nginx -s quit this method is relatively mild compared to some of the stop on the need to complete the process before the current work.

  (3) killall nginx this method is more brutal, we directly kill the process, but no effect in the use of the above, we use this method is still relatively good.

  (4)systemctl stop nginx.service

3. Restart

  systemctl restart nginx.service

4.重新载入配置文件

  nginx -s reload

5.查看端口号

  netstat -tlnp

 

  

 

Guess you like

Origin www.cnblogs.com/liulianghui/p/11569363.html