Skip to content

Nginx

安装

  1. 检测 apt 更新
sudo apt update
  1. 安装 nginx
sudo apt install nginx -y

nginx 要安装在宿主机上 通过容器运行的话需额外配置网络才能访问外部服务

  1. 检查安装
nginx -v

常用命令

  1. 查看状态
sudo systemctl status nginx
  1. 启动
sudo systemctl start nginx
  1. 停止
sudo systemctl stop nginx
  1. 重启
sudo systemctl restart nginx
  1. 平滑重载(不掉线)
sudo systemctl reload nginx

developed using VitePress.