Solved

Is it possible to have two ServerName in the one virtualhost?

Posted on 2011-03-17
6
501 Views
Last Modified: 2013-11-08
Hi All,

Is it possible to have two ServerName in the one virtualhost?

e.g. www.mydomain.net and www.mydomain2.net

<VirtualHost 192.168.0.2:80>
ServerName www.mydomain.net
DocumentRoot /var/www/mydomain.net/
</VirtualHost>
0
Comment
Question by:detox1978
  • 3
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
Jan Springer earned 333 total points
ID: 35156611
Yes.

ServerName www.mydomain.net
ServerAlias www.mydomain2.net

As long as the IP of the two is the same.
0
 
LVL 2

Author Comment

by:detox1978
ID: 35157005
Yeah, it's the same.  Can you have more than two?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 35157037
With multiple ServerAlias statements.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 2

Author Comment

by:detox1978
ID: 35157189
Is there any limit.  I wanted to add around 100.
0
 
LVL 1

Assisted Solution

by:crazyn3wf
crazyn3wf earned 167 total points
ID: 35157234
I dont think there is a limit. Just use

ServerAlias domain1.com domain2.com domain3.com domain4.com ....
0
 
LVL 28

Assisted Solution

by:Jan Springer
Jan Springer earned 333 total points
ID: 35157400
I don't think that's a problem.  You can also aggregate similar domains with the wildcard (*):

www.domain*.com
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question