Forum Moderators: phranque

Message Too Old, No Replies

Include paths by virtual host

         

supermanjnk

1:09 pm on Jan 6, 2005 (gmt 0)

10+ Year Member



I have virtual hosts set up in apache, I'm wondering if there is any way or what is the best way, to set include paths per virtual host, right now all my include paths are pointing to like to the pear directory. I'm running ubuntu linux.

coopster

1:59 pm on Jan 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can put most, if not all, PHP directives in your Apache conf files. Have a look at the PHP ini_set() [php.net] documentation for more information.
<VirtualHost *:80> 
ServerName example.com
ServerAlias *.example.com
# Example for a windows configuration:
# Note, this is all one line (separated here to stop wrapping in the forum):
php_value include_path ".;C:/php/PEAR.;C:/Program Files/Apache
Group/Apache2/htdocs/example.com/includes"
# Example for a *nix configuration:
php_value include_path ".:/path/to/php/PEAR.:/path/to/example.com/includes"
</VirtualHost>