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?
ServerAlias : Alternate names for a host used when matching requests to name-virtual hosts. Most people simply use ServerName to set the 'main' address of the website (eg. 'mywebsite.com') and ServerAlias to add additional addresses the website will be bound to (eg.
The Apache HTTP server supports virtual hosts, meaning that it can respond to requests that are directed to multiple IP addresses or host names that correspond to the same host machine. You can configure each virtual host to provide different content and to behave differently.
There are two types of virtual hosts on Apache: IP-Based Virtual Hosting – every individual website on the Apache Server uses a different, unique IP address. Name-Based Virtual Hosts – enables you to add multiple domains using a single IP address.
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 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With