0

If I move a server to local machine, how can I access the website it's serving in my local network?

Right now if you go to the website's link, domain name will point to our server but what is we move the server from hosting company to our office. We don't need to keep the server accessible publicly. We just need it for local use.

2
  • Please mention your reason for downvote so I can review the question or delete it or move it to somewhere else. Thanks.
    – Mikael S.
    Feb 6, 2014 at 11:31
  • 1
    This question is too broad - it would require an extensive tutorial to answer. Describe what you've tried, and narrow your question(s) to specific tasks you need help with. Feb 6, 2014 at 11:35

1 Answer 1

2

To view a domain locally (not over the internet) you would need to add an entry in your hosts file with the following format

ipaddress hostname hostname2 hostname3

Example:

192.168.1.10 staging1.website.com staging2.website.com.au backend.website.com

Your host file can be found at either:

/etc/hosts

C:\Windows\System32\Drivers\etc\hosts

5
  • Probably won't work too well when he moves his webserver from the hosting facility and what used to be at www.whatever.com is now on the office LAN and at [Private IPv4 address], though. Feb 6, 2014 at 11:51
  • I was thinking to ask it on SuperUser but I was confused. Anyway thanks for your help. Now I have a clue to what to look for at least. Appreciate your effort @VasiliSyrakis.
    – Mikael S.
    Feb 6, 2014 at 11:52
  • Just one question Mikael, when you say "local use" do you mean for multiple people to access on a LAN, or just local on the server itself? Feb 6, 2014 at 12:40
  • @VasiliSyrakis, doesn't really matter. Even on the server itself would be enough. We just want to browse the system as if it's online and build a new system based on that.
    – Mikael S.
    Feb 6, 2014 at 12:51
  • If that's the case, editing the hosts will suffice. If you need other workstations on your LAN to view it, you need to edit the hosts file on each workstation as well. Feb 6, 2014 at 13:02

You must log in to answer this question.

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