I am trying that phpmyadmin is only enabled on the domain test.test.nl. And not test2.nl. I am trying this with the following code:
<VirtualHost *:80>
DocumentRoot /var/www/404
</VirtualHost>
<VirtualHost *:443>
ServerName test.test.nl
DocumentRoot /var/www/404
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php
# Authorize for setup
<Files setup.php>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Files>
</Directory>
SSLEngine On
SSLCertificateFile /var/www/certificates/server.pem
</VirtualHost>
But this work not for me. I can reach phpmyadmin also on https://test2.nl/phpmyadmin. I only want that it is enabled for https://test.test.nl
How must i do this?
Tom
Edit: typo;)