hmzone 发表于 2018-11-14 08:10:04

nginx部署一个Web站点(2)

  Nginx的默认站点是Nginx安装目录nginx下的html目录,我的安装目录是/application/nginx
  

grep html /application/nginx/conf/nginx.conf  
# 查询结果
  
root   html;    # 默认站点目录,就是/application/nginx/html
  
indexindex.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>  

  使用客户端浏览器访问你的nginx服务器IP地址



页: [1]
查看完整版本: nginx部署一个Web站点(2)