0

Possible Duplicate:
Apache not parsing files? Just sending downloads

Description

Now I have setup up a site in Apache using vhost. If I request something it response me a PHP file raw.

Question

How should I configure my vhost to process PHP files?

Stage

My vhost configuration:

Listen 8010

<VirtualHost *:8010>
   ServerAdmin webmaster@mysite.org
   ServerName mysite.org
   ServerAlias www.mysite.org
   DocumentRoot /srv/www/mysite.org/public_html/
   ErrorLog /srv/www/mysite.org/logs/error.log
   CustomLog /srv/www/mysite.org/logs/access.log combined

   DirectoryIndex index.html index.php

   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
</VirtualHost>

If I request some page it throws me PHP raw file, I have tested this using curl:

$ curl -I http://localhost:8010/index.php
HTTP/1.1 200 OK
Date: Mon, 15 Oct 2012 20:20:31 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Thu, 03 May 2012 16:41:59 GMT
ETag: "48b6a-2871-4bf247b86c3c0"
Accept-Ranges: bytes
Content-Length: 10353
Content-Type: application/x-httpd-php
Israel
  • 111
  • 2

1 Answers1

0

Ensure that mod_php is installed and enabled.

daemonofchaos
  • 1,211
  • 1
  • 8
  • 10