在 Linux 上启动 Nginx

安装 Nginx(如果尚未安装):

sudo apt-get update sudo apt-get install nginx

启动 Nginx

sudo systemctl start nginx

验证 Nginx 是否正在运行

sudo systemctl status nginx

设置 Nginx 开机自启动(可选):

sudo systemctl enable nginx