How do you serve php files located outside of the apache folders

Posted by Lobe on Server Fault See other posts from Server Fault or by Lobe
Published on 2011-02-28T08:07:03Z Indexed on 2012/09/26 3:40 UTC
Read the original article Hit count: 520

Filed under:
|
|
|
|

I've just installed phpMyAdmin at /usr/share/phpMyAdmin on a CentOS 5 machine running webmin / virtualmin. I have also added an alias to the apache config, being the following line:

Alias /phpMyAdmin /usr/share/phpMyAdmin

So that when I visit www.foobar.com/phpMyAdmin it serves phpMyAdmin. The problem is that the php is not being parsed, and is instead being spat out with the html which greatly diminishes the usefullness of what I have done. How can I set up apache or php or whatever to parse phpMyAdmin correctly.

When googling this I wasn't able to get an understandable answer, however the most common related question was whether I am running mod_php or as CGI. php is running via CGI

Thanks

© Server Fault or respective owner

Related posts about apache2

Related posts about php