yum或apt安装对应的运维指令
-
查看版本
nginx -v -
查看配置
vim /etc/nginx/nginx.conf- 默认安装目录为
/etc/nginx
- 默认安装目录为
-
启动
systemctl start nginx -
查看状态
systemctl status nginx -
重启
systemctl restart nginx -
开机启动
systemctl enable nginx -
如果有问题,则检查文件是否哪里写错
sudo nginx -t- 会报错误行数和变量
- 修改无误后,再重启
sudo nginx -s reload