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