Nginx
安装
- 检测
apt更新
sudo apt update- 安装
nginx
sudo apt install nginx -ynginx 要安装在宿主机上 通过容器运行的话需额外配置网络才能访问外部服务
- 检查安装
nginx -v服务管理
- 查看状态
sudo systemctl status nginx- 启动
sudo systemctl start nginx- 停止
sudo systemctl stop nginx- 重启
sudo systemctl restart nginx- 平滑重载(不掉线)
sudo systemctl reload nginx- 开机自启动
sudo systemctl enable nginx