首先安装Nginx
sudo apt-get install nginx
启动Nginx
sudo /etc/init.d/nginx start
可以通过一下命令进行不同操作,其中command可以是下面列表中四个中的任意一个.
nginx -s command
stop
— fast shutdownquit
— graceful shutdownreload
— reloading the configuration filereopen
— reopening the log files
如果想要进行更加复杂的操作请参考官网 http://nginx.org/en/docs/beginners_guide.html