Ubuntu 24.04安装Nginx

张开发
2026/5/25 11:58:47 15 分钟阅读
Ubuntu 24.04安装Nginx
1.更新系统sudo apt update sudo apt upgrade -y2.拉取Nginxsudo apt install nginx -y3.启动管理# 启动 Nginx sudo systemctl start nginx # 查看 Nginx 状态 sudo systemctl status nginx # 设置开机自启 sudo systemctl enable nginx # 重新加载配置修改配置后使用 sudo systemctl reload nginx # 停止 Nginx sudo systemctl stop nginx4.配置文件放置位置/etc/nginx/nginx.conf

更多文章