在Linux中,Nginx的啟動和停止命令如下:
啟動Nginx服務:
sudo systemctl start nginx
停止Nginx服務:
sudo systemctl stop nginx
重啟Nginx服務:
sudo systemctl restart nginx
查看Nginx服務狀態:
sudo systemctl status nginx
啟動時自啟動Nginx服務:
sudo systemctl enable nginx
停止時取消自啟動Nginx服務:
sudo systemctl disable nginx