2

I installed PhpPgAdmin on the Pi and want to access its database from my laptop.

If I type on my laptop's browser http://192.168.1.97/phppgadmin, 192.168.1.97 being the inet adress of my Pi, I get a message from Apache saying

You don't have permission to access /phppgadmin on this server.

How can I change that permission?

Jacobm001
  • 11,898
  • 7
  • 46
  • 56
Diogo Magalhães
  • 473
  • 2
  • 4
  • 11
  • You could try using Filezilla or WinSCP. I've used Filezilla to remotely access files through SFTP with no issues. – C-dizzle Mar 08 '16 at 17:44
  • Solved it myself. Run the command: sudo nano /etc/apache2/phppgadmin.conf and comment the line "Require local" it will allow you to access from http:///phpphadmin – Diogo Magalhães Mar 08 '16 at 18:02
  • @C-dizzle: sftp isn't helpful if you want to access a database. – Jacobm001 Mar 08 '16 at 19:16

2 Answers2

1

Solved it myself. Run the command: sudo nano /etc/apache2/phppgadmin.confand comment the line "Require local" it will allow you to access from http://[Rpi-inet-adress]/phpphadmin

Diogo Magalhães
  • 473
  • 2
  • 4
  • 11
0

You can permit all networks access;

sed -i .bak 's/^(Require local)/#$1/' /etc/apache2/phppgadmin.conf

or a more secure option is to use a SOCS 5 proxy so your browser is considered local;

ssh -fND 127.0.0.1:8080 pi@192.168.1.97 2>/dev/null >&1
user1133275
  • 2,216
  • 15
  • 31