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.

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 www.app.com. 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 app.com? Are you trying to make it accessible to the world? What kind of application? –  Chris S May 12 '10 at 18:58
1  
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

1 Answer 1

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:

<VirtualHost 1.2.3.4:2130>
    DocumentRoot    /path/to/yourapp
    ServerName      yourapphostname
</VirtualHost>

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

 
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.