Connecting Tech Pros Worldwide Forums | Help | Site Map

Apache vhosts and PHP running on Windows 2000 Server

Newbie
 
Join Date: Mar 2008
Posts: 2
#1: Mar 15 '08
I have a problem and can not get it configured. I have searched everywhere and can not find a solution. I appreciate any help.

PHP is running fine if I run <?phpinfo();?> in the htdocs directory. But if I try to configure httpd-vhosts.conf and include it in the httpd.conf file it directs it to the correct path but php won't work. I can post my conf files if you want me to but I thought maybe someone would have a idea. Thanks for your help.

dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,095
#2: Mar 15 '08

re: Apache vhosts and PHP running on Windows 2000 Server


Quote:

Originally Posted by merwinmay

I have a problem and can not get it configured. I have searched everywhere and can not find a solution. I appreciate any help.

PHP is running fine if I run <?phpinfo();?> in the htdocs directory. But if I try to configure httpd-vhosts.conf and include it in the httpd.conf file it directs it to the correct path but php won't work. I can post my conf files if you want me to but I thought maybe someone would have a idea. Thanks for your help.

you mean php won't work, but HTML does display?

if you create multiple sites and put HTML in them, the virtual host works correctly?

if no, post your <virtualhost> blocks.
Newbie
 
Join Date: Mar 2008
Posts: 2
#3: Mar 15 '08

re: Apache vhosts and PHP running on Windows 2000 Server


Yes, html works fine but php will not interpret the php it just displays it as text. I am at the end of my rope, after 3 days of trying to get this to work, here is my simplified vhosts.


NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#



<VirtualHost *:80>
ServerName rapidcontacts.org
DocumentRoot C:/virtualhosts/rapidcontacts/httpdocs
ServerAlias www.rapidcontacts.org
ServerAdmin webmaster@rapidcontacts.org
</VirtualHost>

Thanks for any help you can provide.
Reply