First of all, I am aware of all the questions here on SO with very similar titles, but none of the solutions described there worked for me.
My case is a little bit more specific than those questions. I have a domain name pointing to my own server (Ubuntu 17.04, Apache 2.4). On the server, there is a freshly installed instance of phpMyAdmin. When I'm accessing phpMyAdmin's site using domain.com/phpmyadmin it works fine, and I can log in.
What I am trying to achieve is to access phpMyAdmin from a subdomain (ex. php.domain.com). I have the virtual host set up and when I try to access the site, the login page is working just fine, but when I enter my username and password, nothing happens (as opposed to the domain.com/phpmyadmin method, which works just fine), not even an error message.
What I have tried:
The following is the apache virtual host config file for the subdomain
<VirtualHost *:80>
ServerName php.domain.com
DocumentRoot "/usr/share/phpmyadmin"
<Directory "/usr/share/phpmyadmin">
allow from all
Options None
Require all granted
</Directory>
# RewriteEngine on
# RewriteCond %{SERVER_NAME} =php.domain.com
# RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>
Why is it that I can't login from the subdomain, but I can from domain.com/phpmyadmin and what shoud I do to make it work?
Apparently all I had to do was delete the cookies in Chrome.