Zanam
Zanam

Reputation: 4807

AWS lightsail phpmyadmin inaccessible

I just set up my AWS lightsail and as a first step decided to try the phpmyadmin using bitnami.

I am able to follow the process of setting up the SSH connection successfully

but when I try to go to url

http://localhost:8888/phpmyadmin

It automatically goes to my my domain https://www.mywebsite.com/phpmyadmin with error:

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

I am unable to land to any relevant results from google search.

Upvotes: 1

Views: 1058

Answers (1)

shanjock46
shanjock46

Reputation: 48

This may be a late answer, but even I faced this problem and solved it as below.

The problem is in your server you have enabled force HTTPS redirect (maybe while setting up SSL certificate)

The solution to access PHPMyAdmin using HTTPS is as below:

  1. Make an SSH tunnel:

    ssh -N -L 8888:127.0.0.1:443 -i EXMAPLE.pem USER_NAME@IP_ADDRESS
    
  2. Now access PHPMyAdmin using https://localhost:8888/phpmyadmin/

Hope it will solve your problem.

Upvotes: 2

Related Questions