Solved

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

Posted on 2011-03-17
6
502 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

738 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