Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to alias ip address of a system, I am running a application on my local server but typing ip address in URL doesn't looks good.

share|improve this question

migrated from stackoverflow.com Mar 19 '13 at 8:43

This question came from our site for professional and enthusiast programmers.

    
Try hostname. – Azodious Mar 19 '13 at 6:38
    
what os are you using? – Red Cricket Mar 19 '13 at 6:38
    
Unix machine... – Alok Verma Mar 19 '13 at 6:40
1  
Modifying HOSTS file is the best bet . – Raptor Mar 19 '13 at 6:41
1  
edit your /etc/hosts file add a line like 192.168.1.133 yourserver – Red Cricket Mar 19 '13 at 6:42
up vote 3 down vote accepted

If it is Linux, Unix, Mac (*nix based system) then you add an entry like this in /etc/hosts file:

127.0.0.1       www.example.com

If it is Windows based OS then you add can an entry in %WinDir%\HOSTS OR %systemroot%\system32\drivers\etc\hosts file.

share|improve this answer
    
for Windows based system, there is HOSTS file too ( at C:\Windows\system32\drivers\etc\HOSTS ) – Raptor Mar 19 '13 at 6:40
1  
You've been faster :-) – zero0 Mar 19 '13 at 6:44

You might want to add a line to your /etc/hosts (or your c:\windows\system32\drivers\etc\hosts) like this:

127.0.0.1      myfancyhostname

So http://myfancyhostname/ will point to 127.0.0.1 - like DNS for the poor man. Maybe this helps you to have better looking URLs (I suppose it's for a demo) without changing your hostname or establishing an DNS server.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .