faqts : Computers : Programming : Languages : PHP : Installation and Setup : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 24 people (71%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Can I configure PHP on a per virtual host basis?
Can I configure PHP on a per directory basis using .htaccess?

Jul 5th, 1999 00:54
Nathan Wallace, Jon Parise


In Apache, you can add PHP directives within a <VirtualHost> block if
you like, or you can add them to an .htaccess file in the top of your
PHP document root.

These directives are the same as the php3.ini directives except they
are prefixed with 'php3_'.  For example,

<VirtualHost my.host.com>
DocumentRoot /usr/local/apache/htdocs/my.host.com
php3_include_dir /usr/local/apache/php3
</VirtualHost>

For a complete list of configuration directives see:

    http://www.php.net/manual/configuration.php3