1,更新系统

sudo apt-get update

2,安装nginx

sudo apt-get install nginx

3,验证是否安装成功

curl 127.0.0.1

这里写图片描述


常用配置文件和命令

默认nginx.conf路径:/etc/nginx/nginx.conf

关闭nginx:

sudo systemctl stop nginx

启动nginx

sudo systemctl start nginx

修改配置文件后,重新加载改变后的配置:

sudo systemctl reload nginx

参考链接:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐