Ishwar
Ishwar

Reputation: 6261

Bitnami: For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname

could not access phpmyadmin : http://ip/phpmyadmin

it is showing “For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.”

Please suggest me to solve this problem.

Upvotes: 9

Views: 18674

Answers (5)

Dejan Dozet
Dejan Dozet

Reputation: 1019

I found phpmyadmin.conf at this location: /opt/bitnami/apache/conf/bitnami Edit it with nano to include my IP like this:

Alias /phpmyadmin "/opt/bitnami/phpmyadmin"
<Directory "/opt/bitnami/phpmyadmin">
  Options -Indexes +FollowSymLinks -MultiViews
  AllowOverride All
  Require ip 127.0.0.1
  Require ip the.ip.goes.here
  ErrorDocument 403 "For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname."
  # AuthType Basic
  # AuthName phpmyadmin
  # AuthUserFile "/opt/bitnami/apache/users"
  # Require valid-user
</Directory>

Then I restarted apache service and it worked!

Though I guess when the system hits update it will override this :)

Upvotes: 1

Moses
Moses

Reputation: 349

Edit the phpmyadmin conf file at

sudo nano /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf 

and use:

<Directory "/opt/bitnami/phpmyadmin">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>

Upvotes: 6

Ishwar
Ishwar

Reputation: 6261

Solved by modifying the configuration file.

<IfVersion < 2.3 >
 Order allow,deny
#Allow from 127.0.0.1
 Allow from your_ip
 Satisfy all
</IfVersion>
<IfVersion >= 2.3>
#Require local
 Require all granted
</IfVersion>

Upvotes: 1

Jota Martos
Jota Martos

Reputation: 4714

Bitnami Engineer here,

For security reasons, phpMyAdmin is accessible only when using 127.0.0.1 as the hostname. To access it from a remote system, you must create an SSH tunnel that routes requests to the Web server from 127.0.0.1. This implies that you must be able to connect to your server over SSH in order to access these applications remotely.

  • In Windows, you can configure Putty or the SSH client you have to redirect all the request to a specific port (the 8888 one for example) in your machine to the 80 port of the remote machine.

  • For Unix systems, you can use this command to create the SSH tunnel

ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP

and then use http://localhost:8888/phpmyadmin in the browser.

You can learn more about this in our documentation

https://docs.bitnami.com/aws/apps/wordpress/get-started/access-phpmyadmin/

Upvotes: 18

Lucas Leandro
Lucas Leandro

Reputation: 308

As i understand, to access phpmyadmin, you should have a local server where it will run, like wampp or xampp server. Thats why it asks you for 127.0.0.1 (localhost). What are you trying to do? can you give more details?

Upvotes: 1

Related Questions