Nginx的默认站点是Nginx安装目录nginx下的html目录,我的安装目录是/application/nginx
grep html /application/nginx/conf/nginx.conf
# 查询结果
root html; # 默认站点目录,就是/application/nginx/html
index index.html index.htm; # 站点首页文件
如果要部署一个Web站点,你只需要把开发好的Web页面放到/application/nginx/html下面。
cd /application/nginx/html
ls
rm -f index.html
echo "Hello World" >> index.html
重启nginx服务器
/application/nginx/sbin/nginx -s reload
使用客户端浏览器访问你的nginx服务器IP地址