[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

php and virtual hosts in Apache

I have php4 installed and working on my Apache server for the main site.  I have sense added a site.  php does not seem to be working on that new site since when I view the source I see the php code instead of my parsed php.

Above any <DIRECTORY> information for my main site I have:

LoadModule php4_module        modules/libphp4.so

Here is what the VirtualHost info says about my secondary host:

NameVirtualHost 216.117.175.151
<VirtualHost 216.117.175.151>
DocumentRoot "/www/naabe.com"
ServerName naabe.com
<Directory "/www/naabe.com">
allow from all
#Options +Indexes
    Options Indexes FollowSymLinks ExecCGI
</Directory>
</VirtualHost>

Anyone know what I may have to do to have it start parsing for that second host?

Thanks in advance!
0
wtconway
Asked:
wtconway
  • 3
1 Solution
 
wtconwayAuthor Commented:
sorry for my spelling... I meant to say "I have since added a site"
0
 
gripeCommented:
Do you have an AddType set up for your php scripts?

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
0
 
wtconwayAuthor Commented:
Yes, it is defined above where I have my general options and in my VirtualHost.  It now reads:


<VirtualHost 216.117.175.151>
DocumentRoot "/www/naabe.com"
ServerName naabe.com
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddHandler cgi-script .cgi .pl
AddHandler type-map var
<Directory "/www/naabe.com">
allow from all
#Options +Indexes
    Options Indexes FollowSymLinks ExecCGI
</Directory>
</VirtualHost>
0
 
wtconwayAuthor Commented:
Ok, Sorry.   I actually had a problem in the php page.  For the effort I am awarding gripe the points.

Trav
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now