Access phppgadmin from another computer?

I installed phppgadmin on an Ubuntu server and want to access it from another computer.

He said access was denied when I typed:

 http://<ip>/phppgadmin

Port 5432 opens on the Ubuntu server, but only for the local ip.

thank

+5
source share
4 answers

By default, the configuration file /etc/apache2/conf.d/phppgadmin.conf does not allow anyone other than the local host to access PhpPgAdmin.

Add a line that creates a new allow rule for your IP address, so it looks something like this:

<Location /phppgadmin>
  Order deny,allow
  Deny from all
  Allow from [Your client IP]
</Location>

By the way, this question is probably more appropriate for the stackoverflow serverfault.com website

+7
source

apache ( -). phppgadmin .htaccess, EVERYONE, localhost.

, ALL Allow ( IP-)

+3

, , , " : 403 (Forbidden)" phpPgAdmin , .

Ubuntu: 17.04; phpPgAdmin: 5.1

: out /etc/apache 2/conf-enabled/phppgadmin.conf apache (sudo service apache2 reload)

<Directory /usr/share/phppgadmin>

<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
AllowOverride None

# Only allow connections from localhost:
# Require local

<IfModule mod_php.c>
  php_flag magic_quotes_gpc Off
  php_flag track_vars On
  #php_value include_path .
</IfModule>
<IfModule !mod_php.c>
  <IfModule mod_actions.c>
    <IfModule mod_cgi.c>
      AddType application/x-httpd-php .php
      Action application/x-httpd-php /cgi-bin/php
    </IfModule>
    <IfModule mod_cgid.c>
      AddType application/x-httpd-php .php
      Action application/x-httpd-php /cgi-bin/php
    </IfModule>
  </IfModule>
</IfModule>

</Directory>

/etc/apache2/conf-enabled/phppgadmin.conf

+2

All Articles