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
0
votes
3 answers

adding some domains to /etc/hosts constantly

I've added some local domains to my /etc/hosts on Ubuntu. But it rewrites it every time I reboot OS. How and where can I add constantly my 127.0.0.1 mydomain.local? UPD Before reboot I edit /etc/hosts: 127.0.0.1 localhost.localdomain …
fl00r
  • 565
  • 2
  • 6
  • 20
0
votes
2 answers

hosts.deny file missing

On a freeBSD server, I have a hosts.allow and a hosts.equiv, but no hosts.deny file. Does freeBSD not use the deny file? If it does, can I make the file myself or does it have to be generated by something? I'm doing this to limit SSH access to our…
Safado
  • 4,726
  • 7
  • 35
  • 53
0
votes
2 answers

enable/disabled host's file

Does anybody knows if there is an utility that enable/disable the "hosts' file"
José Carlos
0
votes
2 answers

/etc/hosts file doesnt forward to localhost for subdomain begins with www

On my desktop I use /etc/hosts file like as below for developing purpose 127.0.0.1 a.example.com 127.0.0.1 www.a.example.com 127.0.0.1 adsense.a.example.com 127.0.0.1 foto.a.example.com They all work except www.a.example.com it doesn't…
Gok Demir
  • 273
  • 1
  • 3
  • 14
0
votes
2 answers

Web site from host name requiring authentication

On Windows Server 2003 I am using a web browser (http://servername/site) to get to a web site on itself (servername) referencing an entry in the hosts.txt file - required for the use of the software. I am receiving the user authentication box…
user49352
  • 123
  • 2
  • 4
  • 12
0
votes
1 answer

/etc/hosts: What is loghost? (fresh install of Solaris 10 update 9)

# # Internet host table # ::1 localhost 127.0.0.1 localhost XX.XX.XX.XX myserver loghost What is the purpose of loghost? If it was not for having loghost in there, all the /etc/hosts files on all the servers in…
700 Software
  • 2,163
  • 9
  • 47
  • 77
0
votes
1 answer

Map Apache2 vhost to IP

I know that can be done with the hosts file and that it should be done with it but for some reason I'd really have to make Apache act this way. The problem is: the hosts are already in the DNS which I can't modify at all but they lead to my…
Tommy B.
  • 1,403
  • 2
  • 14
  • 14
0
votes
2 answers

drivers/etc/hosts doesn't work in Windows Server 2008

the following line in hosts file in windows/system32/drivers/etc/hosts doesnt work 127.0.0.1 gotomylocal.com I'm using Windows Server 2008, I'm new and configured Windows Server 2008 unconsciously so there might me something like roles or features…
Kubi
  • 101
  • 1
  • 3
0
votes
3 answers

Apache2 virtual host in a VM, trouble accessing from host machine

I installed a fresh TurnKey LAMP VM (Ubuntu, Apache2, PHP 5.2, the usual) in VirtualBox (latest). I configured networking so it has an IP of 192.168.1.111 on the bridged network. Then I logged into Webmin from the host machine at…
0
votes
2 answers

Hosts file entry directed to a directory on localhost

I have a directory setup with a nice error message at http://localhost/blocked/. I'd like to direct entries in my hosts relating to sites I've blocked to that instead of just 127.0.0.1. 127.0.0.1/blocked/ doesn't work. I'm clueless about the host…
Regis Frey
  • 103
  • 1
  • 4
0
votes
2 answers

Is a matching entry in /etc/hosts required for hostname?

I was installing a Tomcat webapp that refused to work until I stumbled on someone else's issue with an unrelated product. The solution was to add the machine's name to /etc/hosts, to match the name returned by hostname. Is this required for…
0
votes
2 answers

Problems pointing site to site in Hosts file

I'm on my localhost PC. I need to add an entry that maps our public site to our dev server. I tried several things with no luck: 192.168.1.40 oursite.com // where the IP here is our internal dev server or devserver oursite.com oursite.com…
WeDoTDD.com
  • 245
  • 2
  • 5
  • 14
0
votes
2 answers

server-migration issues : how i test my site before DNS A record transfer

I am doing a Server migration of virtual server (host 15+ sites ), I did all file transfer & other configuration , Now I want to test my sites before actual A record transfer , I know I have to entry in my /etc/hosts file on local computer .Can you…
vinayrks
  • 157
  • 1
  • 8
0
votes
1 answer

Why is *.localhost resolved automatically on Ubuntu but not on MacOS?

I have the same hosts file on both Ubuntu and MacOS. 127.0.0.1 localhost On Ubuntu: my-ubuntu$ ping foo.localhost PING foo.localhost(ip6-localhost (::1)) 56 data bytes 64 bytes from ip6-localhost (::1): icmp_seq=1 ttl=64 time=0.129 ms 64 bytes…
floatingpurr
  • 103
  • 5
0
votes
1 answer

Priorize DNS records by server locatoion

Recently I had assigned a task where I am suposed to optimize the login time for a Redhat SSO service that is installed on a RHEL 7.9. This service uses multiple Active directories to validate the user's credentials. All these AD's are spread around…
Andrei
  • 3
  • 1
1 2 3
9
10