Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Hi all I am very new to this. I have a local intranet running an apache server. To access the web application, I am using the URL localhost:2130/app/. I would like to change it to something like Is this even possible?

well, if I edit my local hosts file to say "localhost:2130/app/ app", i can go to the page by just typing "app" in the URL address but this only works on my local machine. If I want to access it on other computers, I have to update the hosts file on those computer too. I don't want to update the file on every computer. And is wondering if you can do this on the server.

share|improve this question
We need a little clarification. What do you mean by "using hosts"? Do you own Are you trying to make it accessible to the world? What kind of application? – Chris S May 12 '10 at 18:58
Yeah... your edit didn't clarify anything. "hosts" typically means /etc/hosts, but it's not capable of doing what you claim. – Ignacio Vazquez-Abrams May 12 '10 at 19:06
@Ignacio. You are 100% correct. Sorry about that. – onesith May 12 '10 at 19:53
up vote 1 down vote accepted

The hosts file will allow you to point a name to an IP, but it won't go any further than that.

Do you run an internal DNS server for your network? Do you have a local domain for your local network? If you run a local domain for your local network you can add entries in there to point the IP for the name to that host, which would mean you don't need to apply it to all your local servers.

As for the Apache side, you may want to look at virtual hosts. An example might be something like this:

    DocumentRoot    /path/to/yourapp
    ServerName      yourapphostname

There are plenty of examples in the Apache documentation on how to set that up.

share|improve this answer
Thank you. I tried to implement this but didn't think about the missing ingredient, the DNS server. – onesith May 12 '10 at 19:58

Your Answer


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.