RE: [PHP] Re: NameVirtualHost breaks PHP
| From: | Greg Blakely | Date: | Sun, 28 Apr 2002 21:11:01 +0000 |
| Subject: | RE: [PHP] Re: NameVirtualHost breaks PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-95015@lists.php.net to get a copy of this message | ||
Yuri Petro asked:
> Can you indicate Apache settings regarding php and virtualhosts?
In the "main" server configuration area, I have:
# The following is for PHP4 (conficts with PHP/FI, below):
<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
</IfModule>
# The following is for PHP3:
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
</IfModule>
# The following is for PHP/FI (PHP2):
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
</IfModule>
### and the, further on down, there is:
NameVirtualHost *
### and then, under the "VirtualHost" area, I have:
<VirtualHost *>
Port 80
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
ServerAdmin xxxxxx@xxxxxxx.com
DocumentRoot /home/tcrc/www/forum
ServerName forum.tcrconline.com
ErrorLog /home/tcrc/logs/error_log
CustomLog /home/tcrc/logs/access_log combined
</VirtualHost>
###
### By the way, I tried it with and without the "AddType" statements in
the VirtualHost area.