abcy122
abcy122

Reputation: 125

PHP files are downloaded by browser instead of processed by apache2 after creating virtual hosts

I created a virtual host in apache2 (LAMP) as shown below and the php files are downloaded by the browser instead of processed by apache. I created an HTML file and it worked.

/var/www/myvirtualhost.com/public_html

ServerAdmin [email protected]

DocumentRoot /var/www/myvirtualhost/public_html/

 ServerName myvistualhost

Upvotes: 0

Views: 169

Answers (1)

pusle
pusle

Reputation: 1523

Check this question out. It's for Apache on Ubuntu, and you don't specify what system you are on, but maybe you can get a tip from there.

Basically it describe how to install the PHP module for Apache, which is probably not installed if PHP-files are downloaded.

Upvotes: 1

Related Questions