虛擬機器主機設定
<VirtualHost 127.0.10.10>
ServerAdmin webmaster@hostmachine.com
DocumentRoot /www/virtual.com/htdocs
ServerName www.virtual.com
UserDir /www/virtual.com/htdocs
ScriptAlias /cgi-bin/ /www/virtual.com/cgi-bin/
ErrorLog /www/virtual.com/logs/error_log
CustomLog /www/virtual.com/logs/access_log common</VirtualHost>
目錄設定
<Directory /www/virtual.com/htdocs>
# 對該虛擬機器主機設定是否使用php
php_engine On
# 設定php出錯資訊的調試層級
php_error_reporting 1
# 設定是否記錄php出錯日誌
php_log_errors On
# 設定php的出錯記錄檔
php_error_log /www/virtual.com/logs/php_error_log
# 設定一個php線程的最長存活時間
php_max_execution_time 180
# 設定使用者臨時上傳目錄
php_upload_tmp_dir /www/virtual.com/htdocs/tmp
# 設定包含標頭檔
php_include_path /www/virtual.com/htdocs/include
</Directory>
可執行目錄設定
<Directory "/www/virtual.com/cgi-bin">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>