Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

I need the next: ex1.com = sub.my.ex2.com

Sorry for bad english

share|improve this question

2 Answers 2

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.