We must have encountered such a situation, the need to APACHE2 a site binding multiple domain names, then how to operate it? With Serveralias
Used to be stupid, to make multiple domains point to the same site always write:
ServerAdmin [email protected]
Documentroot/www/domain.com
ServerName domain.com
ServerAdmin [email protected]
Documentroot/www/domain.com
ServerName www.domain.com
ServerAdmin [email protected]
Documentroot/www/domain.com
ServerName abc.domain.com
This is equal to how many domain names are tied and how many virtual hosts are open ...
Later read a book, found that there is a call "Serveralias" things can be used, in fact, can be:
ServerAdmin [email protected]
Documentroot/www/domain.com
ServerName domain.com
Serveralias www.domain.com abc.domain.com #绑定多个域名
How many domain names to tie can be written behind Serveralias, separated by a space
Ding Feng Van van, 2881064156
Apache How does a site bind multiple domain names?