Ubuntu18.04安装Nginx
查看80端口
$ lsof -i tcp:80
更新apt
$ sudo apt update
安装nginx
$ sudo apt install nginx
管理nginx
$ sudo systemctl status nginx
$ sudo systemctl start nginx
$ sudo systemctl stop nginx
$ sudo systemctl restart nginx
$ sudo systemctl reload nginx
$ sudo systemctl enable nginx
$ sudo systemctl disable nginx
查看nginx配置文件
$ nginx -t
设置防火墙
$ sudo ufw allow 'Nginx Full'
$ sudo ufw status