The error is probably because you don't have SSL set up as described in
Preparing Your Apache Configuration.
Unlike some, I don't consider phpmyadmin to be the devil, but would not recommend exposing it to the whole world either. The Linode guide covers this in
.htaccess File. My suggestion would be slightly different; instead of putting your IP address in the file, use:
Code:
Order allow,deny
Allow from 127.0.0.0/8 ::1
If you're using Apache 2.4 (as on Ubuntu 14.04), use the new configuration syntax instead:
Code:
Require local
This will only permit connections to phpmyadmin from your Linode. (You should verify this by trying to connect from your home machine; you should receive a 403 Forbidden error.)
So how do you connect from your Linode? You connect from home to your Linode via ssh, and set up port forwarding. For example, connect using:
Code:
ssh -L 8080:localhost:80 user@your.linode
Then you can visit
http://localhost:8080/phpmyadmin/ in your web browser (assuming the
symbolic link you set up is named phpmyadmin - if not, use the name you picked in the URL). The traffic will be forwarded over the ssh link and will appear to Apache to be coming from your Linode, and thus will be permitted. Once you log out of your ssh session, phpmyadmin will no longer be accessible.
Because the ssh traffic is encrypted, there is no need to set up SSL for this or set ForceSSL, although you can certainly do so.
Note that in this scenario, anyone who can get a shell on your machine can access phpmyadmin (although they will still need a MySQL username and password to access databases). Of course, those people could just run the mysql client from the command line too. The linchpin of security in this configuration is the restriction in the .htaccess file, so you
must get it correct and
verify it is working as intended.
You could also use a local client like MySQL Workbench, but these require you to either expose MySQL to the internet (about as bad an idea as making phpmyadmin visible to the world) or set up port forwarding over ssh (supposedly MySQL Workbench will do this for you; don't know about other clients).