Aliases in Apache

Hello!

I have a hostname. I would like to make an alias for that hostname. How can I do that in Apahce.

Mateusz

Posted on Oct 6, 2005 2:58 PM

Reply
12 replies

Oct 8, 2005 5:35 PM in response to Mateusz Rajca

You need to learn more about DNS.

Changes in /etc/hosts are, by definition, local to that machine - no other machine anywhere is going to see what changes you've made to your /etc/hosts file.

If you want your site to be accessible to external users by multiple hostnames then you need to setup your DNS accordingly.

For example, it's perfectly legitimate to have your DNS looking something like this:

www.mydomain.net. A 123.45.67.89
mail.mydomain.net. CNAME www.mydomain.net.
foo.mydomain.net. CNAME www.mydomain.net.
bar.mydomain.net. CNAME www.mydomain.net.



In this setup, 'www.mydomain.net' has the IP address 123.45.67.89 (your public IP address) and mail, foo and bar are all aliases to the same address.

Remote users can use any of those names to get to your system, and Apache can be configured to serve different content depending on the hostname they use.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Aliases in Apache

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.