虛擬主機設置
<VirtualHost 127.0.10.10>
ServerAdmin
[email protected] 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>