Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP on VHosts will not work! 1

Status
Not open for further replies.

artfulbodger

Technical User
Jan 3, 2005
109
US
I am at a loss on this one...

Quick synoposis:

I have a LAMP server working just fine. I can server html and PHP code with no problem. When I decide to turn on Virtual Hosting, PHP code stops functioning all together (phpinfo() no longer responds). I know this has to be something simiple, but I am now at a total loss. Can someone point me in right direction?

Here is some snippits of my httpd.conf:

Code:
    AddType application/x-tar .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

..

NameVirtualHost *:80

..

<VirtualHost *:80>
ServerName stsiweb
DocumentRoot /var/[URL unfurl="true"]www/html/stsiweb[/URL]

DirectoryIndex default.htm index.htm index.html index.php
   <Directory "/var/[URL unfurl="true"]www/html/stsiweb">[/URL]
     Options Indexes FollowSymLinks MultiViews
     AllowOverride All
     <IfModule mod_access.c>
       Order allow,deny
       Allow from all
     </IfModule>
   </Directory>
</VirtualHost>

Thanks in advance. I am a so-so newbie to Linux/Apache and I greatly apprecieate any help you guys provide.
 
copy "AddType application/x-httpd-php .php" and paste within <VirtualHost>.

i.e.
Code:
<VirtualHost *:80>
ServerName stsiweb
DocumentRoot /var/[URL unfurl="true"]www/html/stsiweb[/URL]
AddType application/x-httpd-php .php        #this should fix it
DirectoryIndex default.htm index.htm index.html index.php
   <Directory "/var/[URL unfurl="true"]www/html/stsiweb">[/URL]
     Options Indexes FollowSymLinks MultiViews
     AllowOverride All
     <IfModule mod_access.c>
       Order allow,deny
       Allow from all
     </IfModule>
   </Directory>
</VirtualHost>

atsea
 
You are a gentleman and a scholar - it worked!

For some reason, I thought that would be a "global" statement, but I was wrong.

Thanks for the valuable help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top