conf/httpd.confDirectoryIndex 指令DirectoryIndex index.php index.html index.htm index.html
apachectl restart 或 systemctl restart httpd# 開頭的行為註解,修改時請移除行首 #。.htaccess 或 <Directory> 區塊覆寫。# 伺服器根目錄
ServerRoot "/usr/local/apache2"
# 網站文件根目錄
DocumentRoot "/var/www/html"
# 允許 .htaccess 覆寫
AllowOverride All
Require all granted
瀏覽器訪問 https://your-domain/,應自動載入 index.php(若存在),否則依序嘗試 index.html 等。