16

After a fresh install of Ubuntu 14.04, I've installed postgresql and phppgadmin from the Ubuntu repos. I am using the Apache2 webserver. PHP is working fine in the webserver, as is PHPMyAdmin, but PHPPgAdmin is not working. When I try to access it at localhost/phppgadmin, I get a 404 message. I've tried creating a symlink in /var/www to the phppgadmin content, but that doesn't seem to work.

How do I fix this?

EDIT: note that I am using a local proxy server (squid) through which I funnel all my online traffic. While this may be part of the problem, I would be surprised if it was, because I am still on the same machine as phppgadmin and the requests logged in the apache access log indicate that incoming requests for the page are coming from the local machine (which is allowed in the policies for phppgadmin, if I understand things correctly).

1
  • 1
    Yes, this works. However this appears to be a problem with the package. conf.d is meant to contain any global configurations which the phppgadmin package appears to assume. I think the config would be more appropriately placed in conf-available and allow the user to enable it with a2enconf.
    – user276010
    Apr 29, 2014 at 19:41

4 Answers 4

44

Try this

sudo cp /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
sudo /etc/init.d/apache2 restart
3
  • Yes, that's it, but isn't this a bug? I can't even enable it using a2enconf...
    – adosaiguas
    May 15, 2014 at 0:12
  • 5
    IMHO it's cleaner to symlink it: sudo ln -s /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf. All other modules on my box were symlinked. Dec 8, 2014 at 22:24
  • My hero! If I find you at a pub or something, I'll offer you a cider. :D
    – N3sh
    Feb 10, 2016 at 16:35
4

You actually want to copy it to conf-available then use a2enconf to enable it:

sudo mv /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-available/phppgadmin.conf
sudo a2enconf phppgadmin
sudo service apache2 reload

Then if you like things tidy

sudo rmdir /etc/apache2/conf.d/phppgadmin
3

I installed phpPgAmin on ubuntu server and I get 404 error it was simple just create a link to phpPagAdmin folder to webserver's home folder:

ln -s /usr/share/phppgadmin /var/www/html/phppgadmin

original document

1
  • in my case i had to slightly change this to ln -s /usr/share/phppgadmin /var/www/default/phppgadmin
    – jnardiello
    Jul 14, 2014 at 17:07
0

I had the same problem, and made the folowing, now it's working well.

from a terminal with sudo privilege (sudo su)

ln -s /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-available/phppgadmin.conf
a2enconf phppgadmin
service apache2 reload

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .