ServerType standalone # 獨立守護進程模式
ServerRoot "d:/Apache" # 服務器根目錄
PidFile logs/httpd.pid # 父進程 PID 文件
ScoreBoardFile logs/apache_status # 運行狀態共享內存文件
# ResourceConfig conf/srm.conf # 已併入 httpd.conf
# AccessConfig conf/access.conf # 已併入 httpd.conf
Timeout 300 # 300秒無數據傳輸則斷開
KeepAlive On # 啟用持久連接
MaxKeepAliveRequests 100 # 每連接最大請求數
KeepAliveTimeout 15 # 保持連接等待超時
MaxRequestsPerChild 0 # 子進程處理請求數上限(0=無限)
ThreadsPerChild 50 # 每子進程線程數(Win32 MPM)
Port 80 # 標準 HTTP 端口
# Listen 3000 # 額外監聽端口
# Listen 12.34.56.78:80 # 綁定特定 IP:端口
# BindAddress * # 監聽所有 IP
取消註釋啟用所需模塊,如 mod_rewrite、mod_ssl 等。
ServerAdmin you@your.address # 管理員郵箱,錯誤頁顯示
# ServerName new.host.name # 有固定 IP 可不設
DocumentRoot "d:/Apache/htdocs" # 文檔根目錄
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Options: None|FollowSymLinks|ExecCGI|Indexes|Includes|All
# AllowOverride: None|All|AuthConfig|FileInfo|Limit 等
此配置為 Win32 開發環境典型模板,生產環境需按安全基線加固。