Nginx Web Server 在找不到預設首頁時,會出現如下的圖
畫面上會出現使用的 Web Server 種類及版本[@more@]隱藏方式:CentOS 7.x
1. 先備份原設定檔
# cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.$(date +%F)
2. 在 nginx.conf 設定檔中加入 server_tokens off; 設定
# /bin/sed -i ‘/root /usr/share/nginx/html;/a server_tokens off;’ /etc/nginx/nginx.conf
3. 重新啟動 Nginx Web Server
# systemctl restart nginx