Linux-Noob Forums
apache/virtualhosts/phpmyadmin - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html)
+--- Forum: LAMP (https://www.linux-noob.com/forums/forum-83.html)
+--- Thread: apache/virtualhosts/phpmyadmin (/thread-349.html)



apache/virtualhosts/phpmyadmin - inittux - 2011-08-09


I have my apache and virtualhost setup same as in this post

After this I installed phpmyadmin, by downloaded it and untaring it and renaming the folder to phpmyadmin. And I restarted apache and testet it: http://myip/phpmyadmin.

phpmyadmin wasn't working. I then tried commented out my virtual host and I restarted apache and again I tested http://myip/phpmyadmin and it worked. So how come

phpmyadmin works when I'm not using my virtual domain and when I do it doesn't work?




apache/virtualhosts/phpmyadmin - inittux - 2011-08-09


Quote:I have my apache and virtualhost setup same as in this post

After this I installed phpmyadmin, by downloaded it and untaring it and renaming the folder to phpmyadmin. And I restarted apache and testet it: http://myip/phpmyadmin.

phpmyadmin wasn't working. I then tried commented out my virtual host and I restarted apache and again I tested http://myip/phpmyadmin and it worked. So how come

phpmyadmin works when I'm not using my virtual domain and when I do it doesn't work?
 

I figured something else out but not what I mentioned in the above. I got phpmyadmin working without virtual domains and being able

to block all ip's from my phpmyadmin login page, except the ones I give permission to. But as soon as I activated my virtual domain

again. It can't find my phpmyadmin. I did check to see if my virtualdomain is working bij putting a test.php file in my virtual domain

and adjusting it just a bit so I can tell that it's different from the one the one I have in my /var/www/html and it works without any

problems. So my webserver is working just fine and my virtual domain setups works fine too. I think I'm just missing one thing or so

to understand why phpmyadmin is not working when I have my virtual domain activated and when I don't it does.




apache/virtualhosts/phpmyadmin - inittux - 2011-08-09


Quote:<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentcommentid="14838" data-ipsquote-username="feedmebits" data-cite="feedmebits" data-ipsquote-timestamp="1312912082" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="4121" data-ipsquote-contentclass="forums_Topic"><div>
I have my apache and virtualhost setup same as in this post

After this I installed phpmyadmin, by downloaded it and untaring it and renaming the folder to phpmyadmin. And I restarted apache and testet it: http://myip/phpmyadmin.

phpmyadmin wasn't working. I then tried commented out my virtual host and I restarted apache and again I tested http://myip/phpmyadmin and it worked. So how come

phpmyadmin works when I'm not using my virtual domain and when I do it doesn't work?
 

I figured something else out but not what I mentioned in the above. I got phpmyadmin working without virtual domains and being able

to block all ip's from my phpmyadmin login page, except the ones I give permission to. But as soon as I activated my virtual domain

again. It can't find my phpmyadmin. I did check to see if my virtualdomain is working bij putting a test.php file in my virtual domain

and adjusting it just a bit so I can tell that it's different from the one the one I have in my /var/www/html and it works without any

problems. So my webserver is working just fine and my virtual domain setups works fine too. I think I'm just missing one thing or so

to understand why phpmyadmin is not working when I have my virtual domain activated and when I don't it does.



</div></blockquote>
 

 

I found an answer/solution after searching some more. Here's how it works. In order to use phpmyadmin in your virtualhost you have to add an alias in your virtualhost. Like this:

 

<virtualhost yourip:80></virtualhost>

ServerAlias www.yourdomain.com

ServerAdmin email@domain.com

DocumentRoot /var/www/html/websites/example.com

ServerName example.com

#ErrorLog logs/example.com-error_log

#CustomLog logs/host.some_domain.com-access_log common

Alias /phpmyadmin /var/www/html/phpmyadmin



 

 

I'll never forget this after having spent so much time on it :)Haven't been able to add a second virtual domain yet but will figure it out later.




apache/virtualhosts/phpmyadmin - Dungeon-Dave - 2011-08-15


I would advise that you set your alias to something other than /phpmyadmin - since this is what sniffers search for.

 

(they also try /sql, /myadmin, /admin and a load of others, too!)




apache/virtualhosts/phpmyadmin - inittux - 2011-08-16


Quote:I would advise that you set your alias to something other than /phpmyadmin - since this is what sniffers search for.

 

(they also try /sql, /myadmin, /admin and a load of others, too!)
 

I'll keep that in mind :) thanks