Questions tagged [hosts-file]

The hosts file is a computer file used in an operating system to map hostnames to IP addresses. The hosts file is a plain text file and is conventionally named hosts.

The hosts file is one of several system facilities that assists in addressing network nodes in a computer network. It is a common part of an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

In some operating systems, the hosts file's content is used preferentially to other methods, such as the Domain Name System (DNS), but many systems implement name service switches (e.g., nsswitch.conf for Linux and Unix) to provide customization. Unlike the DNS, the hosts file is under the direct control of the local computer's administrator.

More see at Wikipedia

148 questions
1
vote
1 answer

Domain forwarding or masking on local machine only?

I'm sad to have to ask this question, but I'm not even sure of what to call what I'm trying to do, so Google isn't much help. I'm doing some work on a company website from outside the company's network. Some of the assets on the site are loaded from…
Fo.
  • 3,752
  • 7
  • 28
  • 44
1
vote
2 answers

Jenkins slave configuration issue in linux

I am facing the below issue please have a look. Thanks in advance. Searching for lokesh in /var/lib/jenkins/.ssh/known_hosts Searching for lokesh:22 in /var/lib/jenkins/.ssh/known_hosts [06/04/20 12:59:45] [SSH] WARNING: No entry currently exists in…
1
vote
1 answer

Host file injector with Python

I'm having some trouble with a function that's supposed to identify your operating system and return the corresponding PATH to that hosts file so that the program can read the file and add more lines to it. The problem relies when invoking the…
Yotch
  • 23
  • 6
1
vote
2 answers

Can I edit the hosts file to see the new website and still access the old one?

I'm developing a new website that will have the same domain name as the current old one, but a different host. The new one doesn't have DNS nameservers pointed to it yet, but I edited the hosts file on my computer to be able to access it. Is there a…
Jojo
  • 25
  • 3
1
vote
1 answer

Windows 10 hosts file localhost

I'm using Windows 10. I'm trying to map 127.0.0.1 to a hypothetical domain: en.mylocalhost.tld When I opened C:\Windows\System32\drivers\etc\hosts as Administrator, it was empty. I added following line to it: 127.0.0.1 en.mylocalhost.tld Restarted…
user5155835
  • 4,392
  • 4
  • 53
  • 97
1
vote
1 answer

Application taking a while to listen for incoming connections

I have an application which uses the hosts file to block certain websites. The websites can't connect because of the hosts file, so that works great, however, my program is supposed to raise an event when a website is blocked. I'm using this…
1
vote
1 answer

Setting Up WordPress MS Locally with Port 8888 with XAMPP

I have installed XAMPP and edited the httpd.conf file because my port 80 is busy. So I have the following: Listen 0.0.0.0:8888 Servername localhost:8888 Everything works fine until I try to install WordPress 3.0.5 MS because it will not accept…
user621663
  • 11
  • 3
1
vote
0 answers

Windows Server - IP Alias

I currently have a Windows server that runs iis, SQL and SSIS packages. All of the programs above have connection string configs using the servers local IP address. However, we are about to move our hosting provider therefore the IP address will…
Matthew Stott
  • 395
  • 1
  • 4
  • 15
1
vote
1 answer

How can I create dynamic virtual hosting like *.example.com?

Where * is different for each client like apple.example.com, pearl.example.com. These all should be routed to the same IP and same directory. How to modify the hosts file and the httpd config? More detailed example:
Hey.There
  • 15
  • 5
1
vote
1 answer

Nginx starts and stops too slowly (15 seconds delay)

I found at that for some reason running nginx on command line (same for nginx -s stop etc.) takes quite a long time, over 15 seconds to complete. Yet there seems to be no errors or warnings of any kind. Also, once the server starts, it seems to work…
frnhr
  • 12,354
  • 9
  • 63
  • 90
1
vote
0 answers

Changing Selenium node's hosts file?

As of right now I have 3 different nodes all pointing to the same staging environment, but I wan't to run a few separate tests on a different environment. Is there any way that I could change a node's hosts file on the fly before and after each…
JJ17
  • 13
  • 5
1
vote
1 answer

How to get /etc/hosts entries in puppet?

The types host and augeas can only set certain values in /etc/hosts. facter does not support hosts query. Now I'm considering 1)writing a ruby function, using Resolv library 2)writing a ruby function, and actually read /etc/hosts file Any better…
can.
  • 2,098
  • 8
  • 29
  • 42
1
vote
1 answer

Watir: Alternative to change the hosts file?

I use watir to test a test version of a website. To do so, I have to modify my hosts-file Is there a way to get the same result without modifying the hosts file? The obvious idea to replace the domain with the ip-address in the calling uri does not…
knut
  • 27,320
  • 6
  • 84
  • 112
1
vote
2 answers

Update hosts file on post-build event Visual Studio 2012

I have a VS2012 project. To make it run I need a hosts file entry eg. 127.0.0.1 local.mywebsite.com The problem is I want to make it as easy as possible for new developers to simply get the project from TFS and run it without any extra steps. Is…
1
vote
0 answers

DNS.GetHostEntry - why does it require fiddling with hosts file?

I have a Windows app where the following line of C# code gets invoked IPHostEntry connected = Dns.GetHostEntry("www.somedomain.com"); It works as it should in 99% of organizations (i.e. domain name resolves to an IP address automatically), only in…
joedotnot
  • 4,810
  • 8
  • 59
  • 91