1.如遇403错误,则在ngjnx.conf首行添加user root
2.在server中添加root为项目所在目录
/root/website/html/index.html
root /root/website/
index index.html index.htm;
3.开启nginx
systemctl start nginx
systemctl status nginx
4.cd /etc/nginx
vim nginx.conf
service nginx restart :重启nginx
5.url:139.155.17.27:81/html/
Centos中用Nginx部署静态页面
最新推荐文章于 2024-05-18 17:19:50 发布