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.

How to make few mirror domains for example.com?

Users should be browsing in example.ru/* or example.de/* domains, but all requests should be sent to example.com/* (without redirecting)

I will use it to manage different website languages.

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This depends on how your server is setup. If you're using a NameVirtualHost for your site, it's easy - you just add the following line:

ServerAlias example.ru example.de

to the configuration for your virtual host.

If you're not using virtual hosts, you don't need to do anything - apache will serve the same content regardless of what domain name is used to connect to it.

Of course, you also need to make sure that the DNS records for example.ru and example.de point to the same server as example.com.

If you are using SSL for your website, you need to have a certificate with Subject Alternative Names for all domains you are serving.

share|improve this answer
    
Thanks @Jenny! I forgot to tell one very important detail. I'm using DirectAdmin for hosting management in VPS. So there I can't define this... –  Lucas Apr 15 '13 at 13:07
    
I have no idea what DirectAdmin is. I would suggest you ask their support. –  Jenny D Apr 15 '13 at 13:08

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.