normally, phpmyadmin is configured as alias in wamp packages and some of the projects can be configured in virtual server with port number. Can anybody explain what's the difference between these two and in which scenario any of the feature can be used?
Asked
Active
Viewed 7,468 times
10
-
1Not sure what you mean by the second thing. Do you mean when PhpMyAdmin is a virtual server of its own? The stupid (but correct) answer is that, well, an Alias is an Alias, and a virtual host is a virtual host :) What is your exact use case, what do you need to know? – Pekka Apr 23 '11 at 10:48
-
1What a stupid comment ^^ – user3574492 Apr 22 '16 at 09:12
1 Answers
21
Alias
An "alias" in Apache can be a directory alias, i.e.
Alias /phpmyadmin /usr/share/phpmyadmin
this means you can use http://example.org/phpmyadmin/ and http://www2.example.org/phpmyadmin/ (every host on your apache instance) to access phpmyadmin.
Virtual Host
Virtual hosts are used to host multiple domains on a single apache instance. You can have one virtual host for each IP your server has, or the same IP but different ports, or the same IP, the same port but different host names. The latter are called "name based vhosts".
Each virtual host is configured by itself and does not influence the other vhosts.
There is also a ServerAlias
directive which adds another name to the name based virtual host.

cweiske
- 30,033
- 14
- 133
- 194