Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache serving plain text instead of interpreting php code |
|
Author |
|
G109B
Joined: 04 Nov 2015 Posts: 2 Location: UK
|
Posted: Tue 23 Feb '16 1:58 Post subject: Apache serving plain text instead of interpreting php code |
|
|
This is raspbian wheezy on a pi2B. My phpinfo() file runs perfectly when located in /var/www and accessed via the default site. It does not work in any of the other sites I am hosting. All the sites-available (sites-enabled files) are copies of the default with the DocumentRoot, ServerName, and Directory lines changed, and all work fine with html files. Please can you say what trick I am missing ? |
|
Back to top |
|
G109B
Joined: 04 Nov 2015 Posts: 2 Location: UK
|
Posted: Wed 24 Feb '16 1:22 Post subject: |
|
|
OK, I'll answer it myself, having managed to find a helpful forum.
Here is the Directory section of my sites-available file, modified by adding two IfModule sections:
<Directory /home/mycompany/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
</IfModule>
</Directory> |
|
Back to top |
|
|
|
|
|
|