Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am quite new to website construction. I have been practicing with MySQL and phpMyAdmin before, but only on localhost. It went well. But when I actually bought myself a domain name and changed the document root of my Apache to some other directory (other than public_html and such), I found it's not working as I expected it to.

It happened when I was trying to manage my database from a remote client. I typed in the URL of mywebsite/phpmyadmin, it gave me a 404 error. I ran a little research and found this page and followed the instructions, added

Include /etc/phpmyadmin/apache.conf
to /etc/apache2/apache2.conf. It worked to an extent that I don't get the 404 error any more. But it went more peculiar in that my website started downloading the raw php code file that looks will be rendered as my phpMyAdmin page, but the page is not showing.

Anyone help?

share|improve this question
Oh I'm so sorry folks I forgot to provide my system info... Indeed I am running Ubuntu, 12.10. I can't try out the solutions right now, but I will as soon as I get back to my computers. Thanks guys! You are awesome! ^_^ – alxyzc Feb 10 '13 at 10:43
Your apache server does not how to execute php code: – John_West Jan 28 at 13:58

/etc/apache2/apache2.conf indicates a debian-ish distribution. Did you install the libapache2-mod-php5 and php5-mysql packages? And did you run a2enmod php5?

share|improve this answer
Yes I am running Ubuntu. It appears that I have indeed installed all the packages you mentioned, and all my other php files are functioning just fine. I don't think the php interpreter is the problem. :\ – alxyzc Feb 10 '13 at 11:40
Same issue here – antoniovassell May 29 '15 at 22:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.