Title:VirtualHost PHP 4.x TipsContributor: Randall Goguen (aka Ranman)
Last Update: Friday October 19 22:20 EDT 2001
You can view the settings of most of the configuration
values in the output of <? phpinfo(); ?>
Following is a extract of a httpd.conf file.
NameVirtualHost 10.166.98.200
<VirtualHost 10.166.98.200>
ServerName virtual.com
ServerAlias *.virtual.com
ServerAdmin webmaster@hostmachine.com
DocumentRoot /home/www/www.virtual.com/htdocs
php_admin_value open_basedir /home/www/www.virtual.com
UserDir /home/www/www.virtual.com/htdocs
ErrorLog /home/www/www.virtual.com/logs/error_log
CustomLog /home/www/www.virtual.com/logs/access_log combined
ScriptAlias /cgi-bin/ /home/www/www.virtual.com/cgi-bin/
<Directory /home/www/www.virtual.com/cgi-bin>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# See: http://www.php.net/manual/en/configuration.php
#
# For httpd.conf
#
php_admin_value open_basedir /home/www/www.virtual.com
php_admin_flag engine on
php_admin_flag log_errors on
php_admin_value max_execution_time 180
php_admin_value upload_tmp_dir /home/www/www.virtual.com/htdocs/tmp
php_admin_value include_path /home/www/www.virtual.com/htdocs/include
php_admin_flag short_open_tag on
php_admin_value memory_limit 8388608
php_admin_value error_reporting 15
php_admin_flag display_errors on
php_admin_flag track_errors off
php_admin_value error_log /home/www/www.virtual.com/logs/php_error.log
php_admin_flag magic_quotes_gpc on
php_admin_flag track_vars on
php_admin_value auto_prepend_file /home/www/www.virtual.com/php/prepend.php
php_admin_value auto_append_file /home/www/www.virtual.com/php/append.php
# See: http://www.he.net/info/htaccess/demo.html
#
# For .htaccess
#
php_flag log_errors on
php_flag short_open_tag on
php_value max_execution_time 180
php_value upload_tmp_dir /home/www/www.virtual.com/htdocs/tmp
php_value include_path /home/www/www.virtual.com/htdocs/include
php_value memory_limit 8388608
php_value error_reporting 15
php_flag display_errors on
php_flag track_errors off
php_value error_log /home/www/www.virtual.com/logs/php_error.log
php_flag magic_quotes_gpc on
php_flag track_vars on
php_value auto_prepend_file /home/www/www.virtual.com/php/prepend.php
php_value auto_append_file /home/www/www.virtual.com/php/append.php
</VirtualHost>
Anyone who wishes to make additions or changes to this
PHP Tip email them to webmaster@linuxguruz.org
This document is Copyright (c) 1999 by LinuxGuruz