相對簡單,關鍵在 httpd.conf 設定三項:
BindAddress:監聽 IP(可為 *、具體 IP 或完整網域名)ServerName:主機名,無網域可用 IPDocumentRoot:預設首頁目錄修改後必須重啟 Apache 生效。
問題歸因於兩點:
httpd.conf 中 PHP 相關設定錯誤php.ini 設定不當ScriptAlias /php "d:/php/php.exe"
Action application/x-httpd-php "/php"
AddType application/x-httpd-php .php .php3
application/x-httpd-php 改為 application/x-httpd-php3--activate-module={libphp4.a 路徑}make, make install僅需在 httpd.conf 加入 AddType 行即可。