Page 1 of 1

VirtualHost PHP Tips

New postPosted: Thu Mar 27, 2008 10:41 pm
by Ranman
Code: [Select all] [Expand/Collapse] [Download] (Untitled)
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 *:80

<VirtualHost *:80>
DocumentRoot /home/www/
php_admin_value open_basedir /home/www/
UserDir /home/www/
ErrorLog /home/www/
CustomLog /home/www/ combined
ScriptAlias /cgi-bin/ /home/www/

<Directory /home/www/>
AllowOverride None
Options None
Order allow,deny
Allow from all

# See:
# For httpd.conf
php_admin_value open_basedir /home/www/
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/
php_admin_value include_path /home/www/
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/
php_admin_flag magic_quotes_gpc on
php_admin_flag track_vars on
php_admin_value auto_prepend_file /home/www/
php_admin_value auto_append_file /home/www/

# See:
# 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/
php_value include_path /home/www/
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/
php_flag magic_quotes_gpc on
php_flag track_vars on
php_value auto_prepend_file /home/www/
php_value auto_append_file /home/www/