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.

152 questions
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
1
vote
2 answers

Testing domain with host file

I'm currently working migrating a WordPress installation (live on the web) from one hosting solution to another. In doing so, I am testing the new hosting solution (shared server) by editing my local host file, so that www.domain.com points the IP…
jrothafer
  • 123
  • 5
1
vote
1 answer

Slow sudo and ssmtp (hosts file wrong?)

I'm running an Ubuntu Server 12.04.5 LTS and when I type sudo su it takes 30+ seconds to open the shell. Searching on internet, this problem seems related to the file /etc/hosts and /etc/hostname. This isn't really a problem for me to wait, however…
JohnKiller
  • 158
  • 7
1
vote
2 answers

Share /etc/hosts between root machine and containers

I have a Centos machine with OpenVZ containers. For each container I have an alias in /etc/hosts. I would like to be able to share the /etc/hosts between the root and the containers. Is there a way to do it? Thanks.
Vojtěch
  • 285
  • 3
  • 13
1
vote
0 answers

Clean RHEL5 build from kickstart adds Public IP to /etc/hosts

Our infrastructure has a Kickstart server which can serve up RHEL6 builds with some post-installation scripting that handles customization and configuration. I'm currently in the process of updating the scripting to handle RHEL5 for those few…
theillien
  • 445
  • 3
  • 13
  • 28
1
vote
1 answer

Does my production web server need its domain name in its hosts file?

I just cut over DNS for a .com web site to become live. Does my production web server need its domain name in its hosts file? Like this 127.0.0.1 www.mydomain.com mydomain.com 127.0.0.1 api.mydomain.com Or can I leave that out?
Chad Johnson
  • 489
  • 2
  • 7
  • 14
1
vote
2 answers

HOSTS ignored when disconnected

Problem I’m seeing a strange and extremely frustrating problem. Any system that is not connect to the Internet (Windows 7 shows the no Internet access icon because it cannot constantly ping Microsoft’s servers) cannot even access locally hosted…
Synetech
  • 948
  • 1
  • 12
  • 27
1
vote
2 answers

What if I follow Oracle Instructions for hostname

Oracle Docs requiring Hostname to be FQDN. What do you think? Not really what I want to do but... should I? Verifying Host Names Use the following to verify host name settings: For Oracle Linux 4 and 5, and Red Hat Enterprise Linux AS/ES 4 and…
TelusIT
  • 11
  • 1
1
vote
3 answers

Use SSH hostname aliases in browser

I set up hostname aliases in .ssh/config, which works great: Host my-web HostName 515.346.96.21 So I can do this: ssh my-web But in a browser, I still need to type in "http://515.346.96.21". It would be great to be able to do…
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
1
vote
1 answer

Xcopy and hosts file in windows scheduled tasks

I have some trouble with xcopy or maybe with windows/drivers/etc/hosts DNS file. If I add my xcopy command in a windows scheduled task, xcopy can not resolve server's name stored in hosts file, infact, if I change the command with ip address instead…
Tobia
  • 1,272
  • 9
  • 41
  • 81
1
vote
1 answer

How to send a direccion to the void using the Hosts file and without using 127.0.0.1?

I have some name address that i want to send straight to the void using the HOSTS file but i don't want to use the 127.0.0.1. How can i do that?. Why?, I want to speed up some proccess but 127.0.0.1 is serving a webserver, so if i use 127.0.0.1 then…
1
vote
1 answer

Redirect a url to a different server

I'm looking for a way to redirect any url I visit on my computer (Mac), say www.example1.com/a/b/[\d]+, to another url www.example2.com/a/[\d]+. I don't want this to be on the IP level, just for that particular URL matched by a regular…
1
vote
1 answer

Windows 7 admin can't edit hosts file anymore

The question is simple. Suddenly I can't edit my hosts file on win7 anymore. I am running notepad as administrator, i get access denied saving the file. Under the security tab of the file it says administrators have read/write permission. The owner…
Jeroen
  • 137
  • 7
1
vote
1 answer

Will entries in hosts file on my SBS2008 box allow email to be delivered to other SBS2008 boxes over VPN

I wonder if someone can assist in solving a problem I am experiencing. Our organisation has 13 offices around the country with an MS SBS2008 box in each office. Each office has its own email domain name and public DNS has been configured to deliver…
Lee
  • 11
  • 1
1
vote
1 answer

Is there an easy way to setup "example.com" MX records?

I'm used to use /etc/hosts to fake "example.com" or other domains to point to my local web servers to make tests. I'm trying to do some filtering tests on a multi-domain postfix and I need to fake several domain names to check how it responds…
theist
  • 1,229
  • 2
  • 10
  • 24