1.apache直接Yum安裝網站根目錄是/var/www/html,而/var/www/html/目錄下什麼檔案都沒有,這時候預設頁面由/etc/httpd/conf.d/welcome.conf這個檔案定義,大緻的意思就是說,/var/www/html下無index.html或者index.html.var檔案時,(上面這兩個檔案可以在httpd.conf中定義)
會自動轉到/error/noindex.html中,也就是/var/www/error/noindex.html
其中welcome.conf

,這個403是apache特性,發現/var/www/html沒有檔案就會自動轉成403錯誤。
而它的配置檔案是在/etc/httpd/conf/httpd.conf
編譯安裝的話 跟--prefix=/usr/local/apache2參數有關,是/usr/local/apache2/htdocs/index.html
2.nginx也一樣,直接yum安裝預設首頁是/usr/local/nginx/html/index.html