Jump to content

php not working in virtual hosts with apacheb


Recommended Posts

Hi,

 

I am a newbie.  I am trying to setup virtual hosts with apache & php on linux (debian-lenny) (just did the standard apt-get install php5 apache2)

 

PHP seems to be working when directly accessed, but doesn't seem to work when you access it through a virtual host.  For example,

 

http://173.203.103.24/www.labautomate.net/htdocs/phpversion.php

 

works but

 

http://new.labautomate.net/phpversion.php

 

makes my browser try to download the php file...

 

Could someone help me figure out what is going on?

kkm@hp1:/etc/apache2/sites-enabled$ cat www.labautomate.net

#

#  Example.com (/etc/apache2/sites-available/www.labautomate.net)

#

<VirtualHost 173.203.103.24:80>

        ServerAdmin [email protected]

        ServerName  www.labautomate.net

        ServerAlias labautomate.net

        ServerAlias new.labautomate.net

 

        # Indexes + Directory Root.

        DirectoryIndex index.htm index.html

        DocumentRoot /var/www/www.labautomate.net/htdocs/

 

        # CGI Directory

        ScriptAlias /cgi-bin/ /var/www/www.labautomate.net/cgi-bin/

        <Location /cgi-bin>

                Options +ExecCGI

        </Location>

 

        # Logfiles

        ErrorLog  /var/www/www.labautomate.net/logs/error.log

        CustomLog /var/www/www.labautomate.net/logs/access.log combined

</VirtualHost>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.