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

134 questions
0
votes
1 answer

Hosts file not working with bindings in IIS

I have added a website to IIS with a binding hostname of richard-danvers.dev assigned to port 80 I have then added an entry to the hostfile with the public ip address of the server and the host name: 51.141.98.202 richard-danvers.dev I have also…
DrollDread
  • 149
  • 2
  • 15
0
votes
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…
0
votes
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
  • 2,890
  • 2
  • 24
  • 64
0
votes
1 answer

how to add new lines to windows hosts with a batch file

i know this was already discussed but i didn't find what i needed. I need to add new lines at the end of the hosts window file but, first i need to check if these lines already exist and than adding them. I tried this: set…
Alex
  • 103
  • 8
0
votes
2 answers

How to set up hosts file to allow access to a remote Wordpress database from localhost

My team and I are working on a Wordpress site together. We have one person doing data entry on a live server and the rest of us are working locally. What we would like to do is have our local solutions point to the live server database so that we…
user13286
  • 2,527
  • 6
  • 34
  • 70
0
votes
0 answers

Azure Devops hosted Ubuntu agent cancels build with edited hosts file

If I edit the hosts file using the Ubuntu agent the build just cancels all together. Had no such issue with Host Linux agent. Any ideas? Have tried using npm package hostile to edit the hosts file, and through terminal using sudo tee.
Shu
  • 19
0
votes
0 answers

How to troubleshoot a custom hosts file that's breaking a bank site's functionality

I am using a crowdsourced hosts file with over 40,000 entries to prevent intrusive advertising and tracking. Something in the file seems to be interfering with the functionality of the Citibank website, which makes a "submit" form javascript button…
Knocks X
  • 772
  • 1
  • 10
  • 22
0
votes
0 answers

Connect to specific IP address with httr

I'm trying to access a website from a specific server/IP-address with R. The server is added to my Windows hosts-file like this: IPadress domainname.ext I can access the website with a browser (using basic authorization with username & password).…
MIUn
  • 1
  • 2
0
votes
2 answers

sending an ssh -t command to multiple systems simultaneously (without ansible)

Because of the nature of the script (done at work, on a work RHEL machine) I cannot show the code, but I can at least provide pseudocode to help with a starting point. Currently: start loop 1) read in the first line of a host text file (then the…
0
votes
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
  • 355
  • 4
  • 12
0
votes
1 answer

MAMP PRO and the /private/etc/hosts file

It turns out that today i started trying MAMP PRO for Postfix SMTP. But i had and have a nasty problem. There's no way MAMP PRO 4.2.1 is allowed to overwrite the hosts file, and it needs to, so MAMP PRO doesn't work. I found no clear answer in the…
Marcos Di Paolo
  • 300
  • 2
  • 14
0
votes
0 answers

localhost / 127.0.0.1 suddenly(!) not working anymore (in general, not only for XAMPP)

I'm encountering a sudden problem with my localhost / 127.0.0.1 access. Situation is as follows: I'm using localhost / 127.0.0.1 for my developement enviroment server (XAMPP), so i can access the in-progress version of my project via browser. I also…
0
votes
0 answers

Can't access nginx wordpress site with Mac Local hosts

OK, I'm tearing my hair out with this one. And will hopefully face palm when someone lets me know the obvious (but not to me) answer. I've got a working site at https://example.com running apache, SSL and php5.5. I want to change to nginx and…
B. Kold
  • 109
  • 1
  • 1
  • 5
0
votes
0 answers

Configure DEV-Domain for TYPO3 on macOS X by editing hosts file

I installed TYPO3 on a virtual machine (Ubuntu, Apache, MySQL) running in VirtualBox on macOS X. It did work so far, I can access the TYPO3 installer using this URL: http://1.2.3.123/t3projekt1 When accessing this URL the TYPO3 installer appears…
user838531
  • 416
  • 4
  • 11
0
votes
2 answers

How to easily switch between dev and prod environments

What is the best way to get dev and test browsers to resolve our production domain name to dev and test environments? Say our production domain is widgets.com. In the past, we've used internal DNS for devwidgets.com, testwidgets.com,…
1 2 3
8 9