Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I am building a Facebook app. Facebook requires I access sites by name and not by some address like 192.168.1.200:7654. But the testers are accessing the site like this now, i.e., by using this address 192.168.1.200:7654. This testing server is in our LAN. (Its address is 192.168.1.200 and the port number is 7654, so everyone gets to that site when they type this address.)

Now I want everyone to be able to access that site by some domain name, such as xyz200.com, so that I could specify it in the app domain of Facebook. How do I do this?

I hope I am making myself clear. Please comment if it’s not clear.

share|improve this question

marked as duplicate by CharlieRB, Scott, Dave M, Canadian Luke, davidgo Apr 2 '13 at 20:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Thanks Scott for editing my post –  user1590011 Apr 1 '13 at 18:14

2 Answers 2

Since your users are pointing to 192.168.1.200.7654, they are obiviously on your internal lan, and as such, you can install and configure a DNS zone on your internal network that applies a name to your site, so that they could use http://xyz200.com:7654 to access the application. This dns zone would only be accessible within your lan however, and no one on the outside will ever know it exists or recognize the name.

If I am understanding what you are saying about the facebook integration however, in the situation above, you could not tell FB that you are on xyz200.com, since as far as the public world is concerned that domain does not exist, or belongs to someone else. to FB, they couldn't really care less what your dns Name is, as long as they can query a public dns server to get its IP address, and as you describe it, that is not possible yet.

in order to have a dns name that you could give FB, you need to register it with a registrar like tucows, godaddy, etc, and set your server up to be accessed from the internet.

share|improve this answer
    
Thanks for clearing my doubt, as I was more concerned about the steps to tackle it, but anyway i should have provided more detail in my problem statement. All the systems are ubuntu systems. Given this is it necessary for me to install DNS zone, is it not possible for me to do some changes in hosts file, server apache configurations etc to achieve the same? I am a real novice please do not mind my ridiculously silly question. –  user1590011 Apr 1 '13 at 18:08
    
yes, you could use a host file if all you are worried about is internal resolution. –  Frank Thomas Apr 1 '13 at 18:12
    
Thanks Frank Thomas. So its possible to achieve this just by making appropriate changes into /etc/hosts file. –  user1590011 Apr 1 '13 at 18:13
up vote 0 down vote accepted

First of all thanks to Frank Thomas for providing me with the direction in the first place. His answer is correct but even then I would like to add steps to achieve the solution of aforementioned problem.

This kind of problem of using some name can be solved on ubuntu systems by doing changes in the /etc/hosts file.

So if xyz200.com is the name of the site you want to give and 192.168.1.200 is the site IP in LAN for that machine. Then in /etc/hosts of each machine that want to access the test server provide a line with the details.

             xyz200.com            192.168.1.200
share|improve this answer

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