Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 domains:

  • ex1.com
  • ex2.com

DNS records: MYIP @ my.ex2.com

httpd-vhosts.conf

<VirtualHost *:1337> 
DocumentRoot "D:/Webserver/domains/ex1.com/www" 
ServerName "ex1.com" 
ServerAlias "ex1.com" "sub.my.ex2.com"
ErrorLog "logs/ex-error.log" 
CustomLog "logs/ex-access.log" common 
<Directory "D:/Webserver/domains/ex1.com"> 
Allow From all 
AllowOverride All 
</Directory> 
</VirtualHost> 

How to make a subdomain to my.ex2.com as alias ex1.com?

What I need: ex1.com = sub.my.ex2.com

share|improve this question

You just add all the domains you want into the serverAlias directive: http://httpd.apache.org/docs/2.0/mod/core.html#serveralias

share|improve this answer

Correct DNS record *.my @ ip

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.