Usually, the syntax in the /etc/hosts file is

IP hostname alias1 alias2

but I want to make something like

SERVER  SERVER2

but I don't want to specify the SERVER IP in the file, only the host name.

Is there any way to achieve it, with this file or any other? Thanks.

link|improve this question

75% accept rate
feedback

1 Answer

up vote 2 down vote accepted

The only way I know of to easily achieve what you want is to simply insert the record if you have your own DNS server, or see if your router allows you to insert custom zones.

However, you will probably still have the same problem as (If I understand what you want to do) remote servers usually need to be configured for host headers if the server hosts more than one website.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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