Questions tagged [hosts-file]

Hosts file is an OS file to map hostnames to IP addresses.

Hosts file is an operating system file that maps hostnames to IP addresses. It is a plain text file. In modern operating systems, the hosts file remains an alternative name resolution mechanism, configurable often as part of facilities such as the Name Service Switch as either the primary method or as a fallback method.

150 questions
2
votes
1 answer

how to map hostnames to IP addresses on a Linux system

I am migrating from windows to linux, and I am using ubuntu for my development now. I installed apache and it works great; my problem isIi need to use a fully-qualified domain name to access my local webserver, ie http://www.example.com/ should go…
rajarmaesh
  • 23
  • 1
  • 3
2
votes
2 answers

Not obeying changes to HOSTS file

Suppose example.com points to 1.2.3.4 IP address. I want to be able to put something.example.com in my Windows hosts file so that it goes to another IP address. I've defined it as such in the hosts file. 9.8.7.6 something.example.com When I ping…
FinalForm
  • 125
  • 4
2
votes
3 answers

editing apache vhosts and ubuntu hosts file?

I have just installed ubuntu (11.04). I have installed apache/mysql/php etc. I have a few sites sitting in /var/www/site1 /var/www/site2 /var/www/site3 I want to be able to access these…
Hailwood
  • 49
  • 7
2
votes
1 answer

Is adding servername as an alias for localhost/loopback correct?

On linux systems, I've seen many variations of /etc/hosts configurations with regards to the loopback address, localhost, and server aliases. Some include the servername as an alias for the localhost/loopback address (127.0.0.1), and others don't.…
nezroy
  • 122
  • 6
2
votes
2 answers

Windows domain authentication using HOST files

I am currently setting up remote office PCs running Windows 7 Professional to authenticate back to a domain controller running Windows 2008 R2 in the headquarters. Is it possible to simply define the domain name of the domain controller using the…
JC 360
  • 21
  • 1
  • 1
  • 2
2
votes
2 answers

Browser-level DNS settings, to work like the hosts file at system level

The web application we develop is doing certain things depending on the domain and subdomains in the address. To be able to develop and test everything on a local environment, one would need to bind the domains to 127.0.0.1, using the hosts…
Gabriel R.
  • 165
  • 8
2
votes
3 answers

Editing /etc/hosts

I just signed up for a VPS with Linode, and am going through the beginners' setup instructions, but am a bit lost with the editing for /etc/hosts. It suggests that I edit it as follows (where 12.34.56.78 is my server's ip): 127.0.0.1 …
wyatt
  • 123
  • 2
2
votes
4 answers

Using /etc/hosts to redirect traffic during DNS switch

I'm migrating a rather busy site to another server cluster. The site with a MySQL master and two slave servers. I'd like to have as little downtime as possible during the switch, and my biggest concern is the time it takes for the DNS change to…
2
votes
2 answers

user version of /etc/hosts

I am a user on a Solaris 10 system and I wish to maintain my own version of /etc/hosts. This file will function like a normal /etc/hosts, except it will only resolve hosts from processes that I run. Since I do not have the ability to write to…
David
  • 557
  • 2
  • 6
  • 13
2
votes
2 answers

/etc/hosts file for a multi-homed, multi-domain machine?

I have a server (debian) with two network interfaces that I would like to host multiple services and domains on; it is not entirely clear to me how the hosts file should be set up. Example: eth0, bound to WAN interface 1.2.3.4: mail.example.com …
mikewaters
  • 1,135
  • 1
  • 14
  • 26
2
votes
1 answer

Sendmail /etc/hosts and DNS ... what is the correct way?

I found one tutorial on setting up sendmail that says that in the /etc/hosts file, "The entry for 127.0.0.1 must always be followed by the fully qualified domain name (FQDN) of the server." Like so: 127.0.0.1 bigboy.my-site.com localhost.localdomain…
ben
2
votes
3 answers

Can't access network share with name defined in hosts file

I have a network share on a machine that I can only reach by IP address. I then defined an alias for the IP in my hosts file so I could use that instead of the IP but then I can't log on to the share, I just get the logon prompt again and again. So…
Einar Egilsson
1
vote
0 answers

Is there any IETF / RFC standard defined for hosts file encoding?

While going through the accepted answer for hosts file ignored, how to troubleshoot?, I observed the statement "The hosts file should encoded in ANSI or UTF-8 without BOM". As I personally faced issues using an application due to hosts file in…
ramtech
  • 133
  • 4
1
vote
3 answers

How to share /etc/hosts?

On my lan, all my etc/hosts are identical, except of course the first lines 127.0.0.1 localhost.localdomain localhost 192.168.0.1 thismachine.thisdomain thismachine Is there a simple way (I'm not speaking about DNS) to share the rest of the file,…
jeje
  • 129
  • 2
  • 5
1
vote
1 answer

Server impersonation - Target account name is incorrect

I am setting up a test Windows 7 workstation in my environment, which I have named DevWS1. This machine needs to be able to connect to development data while looking like it's in the live side of things. For the most part I have this working, but…
tcw
  • 21
  • 1
  • 3