kkm5848 Posted March 14, 2010 Share Posted March 14, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/195196-php-not-working-in-virtual-hosts-with-apacheb/ Share on other sites More sharing options...
trq Posted March 14, 2010 Share Posted March 14, 2010 Post your virtualhost configurations. By default, php will be installed globally on Debian. Quote Link to comment https://forums.phpfreaks.com/topic/195196-php-not-working-in-virtual-hosts-with-apacheb/#findComment-1026053 Share on other sites More sharing options...
kkm5848 Posted March 15, 2010 Author Share Posted March 15, 2010 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 webmaster@labautomate.net 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> Quote Link to comment https://forums.phpfreaks.com/topic/195196-php-not-working-in-virtual-hosts-with-apacheb/#findComment-1026094 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.