How do I make a Windows sub-subdomain?

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

Answer

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

Attribution
Source : Link , Question Author : Kirill Firsov , Answer Author : Bart B

Leave a Comment