Contents:
yum install nginx -y
systemctl enable nginx #开机自动启动 systemctl start nginx systemctl stop nginx systemctl restart nginx
在修改配置了配置之后,需要重新启动服务的时候,先用nginx -t检测一下配置有没有错误。
nginx -t