安装nginx 链接如下
https://www.runoob.com/linux/nginx-install-setup.html
设置开机自启动
[root@localhost /]# cd /lib/systemd/system/
[root@localhost system]# vim nginx.service
[Unit] Description=nginx After=network.target [Install] WantedBy=multi-user.target [Service] Type=forking ExecStart=/usr/local/webserver/nginx/sbin/nginx ExecReload=/usr/local/webserver/nginx/sbin/nginx -s reload ExecStop=/usr/local/webserver/nginx/sbin/nginx -s quit PrivateTmp=true
将前端项目放在 /usr/local/webserver/nginx/html 中 直接浏览器访问ip即可(因为端口是默认的80)