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地址