安装nginx
``` apt install nginx
3. 启动nginx
4. ```
systemctl start nginx
默认是80端口,所以公网IP:80查看能否访问到nginx
查看nginx安装地址
``` whereis nginx
9. ![](https://strongwillpro.oss-cn-beijing.aliyuncs.com/img/20221203212535.png)
10. 修改nginx启动页面
11. ![](https://strongwillpro.oss-cn-beijing.aliyuncs.com/img/20221203212603.png)
12. 修改nginx配置,在nginx.conf文件中
13. ![](https://strongwillpro.oss-cn-beijing.aliyuncs.com/img/20221203213426.png)
14. 添加一个server来添加一个公网访问端口
15. ![](https://strongwillpro.oss-cn-beijing.aliyuncs.com/img/20221203213739.png)
16. ```
systemctl restart nginx
修改配置文件后需要重启