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

Where is the hosts file located in Mediatemple (dv)?

I need to edit the hosts file in my (dv) server. However, the file isn't under /etc. Where do I edit it in Mediatemple? Any help will be appreciated.
Dave
  • 225
  • 3
  • 8
1
vote
1 answer

Access host computer's (IIS7) localhost:33369 from virtualbox IE6

trying to setup my virtualbox copy of windows xp and have it be able to access my host computer's (win7) IIS 7 express localhost:33369 the virtualbox ipconfig IP Address: 10.10.2.15 subnet: 255.255.255.0 Default gateway: 10.10.2.2 the win 7…
tester
  • 565
  • 8
  • 18
1
vote
2 answers

How to use the hosts file to make google.com resolve to bing.com on a single machine

I am having a little trouble understanding how to manipulate the hosts file. I am using IIS 7.5 and Windows Server 2008 RC2. How can I make any requests from my machine to google.com resolve to bing.com?
smartcaveman
  • 685
  • 2
  • 8
  • 18
1
vote
2 answers

Use hosts file to support DNS server on Windows 2003 Server

Is it possible to make the Windows 2003 Server Dns Server lookup domains in the hosts file also? This would be nice to implement a corporate block list for all those ad sites, and for having a central place to configure them. And the hosts file can…
Daniel
  • 844
  • 7
  • 24
1
vote
2 answers

Should a server's hostname have a DNS A record?

I have a VPS which is currently serving 2 websites and a game server. The "primary" website - my website - is robinjam.net. I've read multiple conflicting tutorials on the internet regarding configuration of hostname, /etc/hosts and DNS, and I'm…
user75046
1
vote
2 answers

How to fix windows 7 dns override of local hosts file?

I ran into the following problem under Windows 7: name resolution uses the result from a DNS lookup instead of using what I have in my local hosts file. This is different from previous versions of Windows. What workarounds are there to fix this…
1
vote
5 answers

How to monitor a program's Internet activities?

I'm trying to figure out how a program communicates with its website. I've edited my hosts file so that their website points to my computer and set up a script that logs every time it's accessed. But the program is still able to function at times…
fent
  • 113
  • 3
1
vote
3 answers

Editing hosts file on Mac without admin rights

I currently work in a place where every developer programs on the same server and I don't believe it is a very good usage since I have to work on a network share, so it's a bit slow. I setup a copy of BitNami MAMPstack and everything is working…
Tommy B.
  • 1,413
  • 2
  • 14
  • 14
1
vote
3 answers

Is there a tool to export/import Windows Server DNS settings to/from the hosts file?

We have many rules in our internal DNS server and I'd like to use them in my local hosts file. Is there any utility to do this kind of conversion? Update: The DNS server is Windows Server and the use case is that we have many zones I need to use…
Borek Bernard
  • 729
  • 2
  • 11
  • 21
1
vote
1 answer

Apache 2.4 VHosts with FastCGI and suexec-custom

I have setup at my local machine Ubuntu 22.04 Apache 2.4 with suexec-custom. In fact, this setup was working from Ubuntu 16 up to this update to 22.04. I only load some modules, reload some other and suexec was working fine for a test site say it:…
centurian
  • 421
  • 3
  • 7
1
vote
2 answers

How do I serve a localhost projects on a made up domain, such as mysite.test and testing.test simultaneously?

If this is possible it would save a lot of headaches. I would like to bind made up domains to localhost projects, if that is possible. I am on Ubuntu 20.10.
eoyath
  • 21
  • 2
1
vote
1 answer

Exclude subdirectory from host resolution set in /etc/hosts (with dnsmasq, or anything else)

I have a local development tool (LocalWP) that sets the path to my local environment by modifying /etc/hosts. For example, if I set my site in Local to www.foo.com, it'll append the following to the hosts file: 127.0.0.1 www.foo.com This is fine,…
Orun
  • 157
  • 1
  • 6
1
vote
0 answers

windows 10 localhost resolution slow

i am running a local python server on windows 10 and sending requests to it via the localhost domain are significantly slower than using 127.0.0.1. i have edited my hosts file and the problem occurs whether i have 127.0.0.1 localhost commented…
jpro
  • 133
  • 1
  • 4
0
votes
1 answer

AWS listeners interfering with hosts file?

I’m trying to setup a temp WordPress environment to build a new website for a client, but I want to leave the old one in place until the last minute. The old site in up in AWS, new site is traditional hosting. I setup a hosts file so my computer…
0
votes
1 answer

Apache server throw me 502 error when I try to access site with Public IP

I have a little strange case. I configured two servers in AWS: Develop and QA, the two with Ubuntu 16.04, Apache 2 and PHP 7.0. I created a website en Develop, and configured its VirtualHost file. So, in Develop I edit its /etc/hosts file to point…