/etc/hosts is the configuration file with locally known mappings between domain name and ip address.

learn more… | top users | synonyms

2
votes
1answer
471 views

Make an ip based virtual host only respond to a single host name

Is it possible to make an apache ip based virutal host only respond to a specific host name? I have a rouge domain name pointing to my server. I know I could redirect it or throw up a 401, but would ...
3
votes
4answers
319 views

Windows Hosts File Location

I've got a general query regarding the location of the hosts file on Windows. It resides at this location: f:\windows\system32\drivers\etc\hosts My question is why? Could Microsoft have picked a ...
0
votes
2answers
567 views

Xen private networking between multiple hosts

I have two physical hosts running Xen 3.2, sharing storage via iSCSI. On these two hosts are a number of domUs and I'd like to network them in multiple private networks so they can only contact other ...
0
votes
2answers
711 views

Changing 127.0.0.1:81 to Internal Domain Name?

I was wondering the steps I can take to change the localhost name to a test development domain name like "website.dev" on Win7 x64 ? Currently, when my test website builds its assigned to 127.0.0.1:81 ...
0
votes
4answers
68 views

Server refusing access from every host except itself

I have media content on a hosted server that I want to be accessed by another domain. In the configuration file, even if I "Allow from all," all hosts except itself will fetch the hosting company's ...
1
vote
1answer
282 views

Flexible/variable/wildcard vhosts/hosts

I am using wamp, have all my projects in E:\webs\*projectname*\htdocs I want to access all of them in my browser with http://*projectname*.loc is there a way i can set up hosts and vhosts files ...
0
votes
2answers
808 views

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 ...
0
votes
2answers
436 views

RHEL 5.1 loses changes to /etc/hosts above lines for `localhost`

Is there a known fix (other than upgrading from 5.1) to fix /etc/hosts from being replaced on reboot? I discovered this behavior when running HP's Server Automation tools. HPSA sets-up a variety of ...
16
votes
5answers
64k views

How to have Windows Server DNS use hosts file to resolve specific host names

[NOTE: The solution of this question is perfect, by something stray away from what the title indicates.] I'm facing a small problem with Windows Server 2003 DNS service. In my corporation, I'm ...
2
votes
2answers
2k views

How to get the same result as modifying /etc/hosts file, without root access?

The question is simple: no root access, but need to point particular domain name to the specified IP address. What are the other ways to do the same thing as with adding the record to /etc/hosts file?...
0
votes
1answer
267 views

An alias (defined as a hosts entry) for a fileserver works only when it is a win2008-box, why?

On a Terminalserver (win2008), we like to have an alias for the real fileservername and therefor we put a line in hosts like: 192.168.0.10 BigFiler This only works fine for Fileserver under ...
0
votes
3answers
3k views

/etc/hosts file setting for no dns lookup [closed]

Can you explain me what I need to add in my hosts file for no dns look up
1
vote
2answers
264 views

Shorten Long DNS names

Amazon gives us a very long dns names i.e. c-123-123-123-255.compute-1.amazonaws.com Is there a way to map this name into a shorter name i.e. essentially what i want to do is to modify /etc/hosts ...
10
votes
3answers
16k views

hosts file seems to be ignored

I have almost fresh Ubuntu desktop box. OS was installed two weeks ago and updated from karmic repositories. Last week I had no problems with DNS. But this week something had changed. I'm not sure ...
1
vote
3answers
1k views

Set initial path for a SSH config host

What would I have to add to a SSH hosts entry in my config file so that everytime I ssh into that host, I get sent to specific initial path? Host foobar HostName foobar.com User ...
10
votes
2answers
11k views

/etc/hosts , /etc/sysconfig/network and hostname?

I need to do the hostname changes on a centos server which will serve www.myserver.com What do I need to do in /etc/hosts, /etc/sysconfig/network and with the hostname command? In /etc/sysconfig/...
5
votes
2answers
2k views

sendmail on ubuntu (9.10) machine “stopped” sending mail

I'm developing on my ubuntu 9.10 machine for the web (php). I'm using it sendmail for sending mails, and while developing on my local machine, I send local mails (to my user 'doron'). Up until a ...
20
votes
1answer
61k views

CNAME record/alias in windows hosts file?

Is it possible to enter some sort of CNAME record or alias in the windows hosts file (C:\Windows\System32\drivers\etc\hosts)? Basically I want to forward all requests made to host A to host B, ...
0
votes
2answers
1k views

HOSTS / LMHOSTS files on XP System in a AD Domain

I have found that with in my Active Directory (Windows 2003 Interm), there are 4 DC and each is a GLOBAL CATALOG SERVER. So in theory any should be able to authenticate users. that our XP Clients ...
2
votes
3answers
291 views

Alternate to /etc/hosts

We have a server on which we host private services. These services can also be access from rest of the world but there is slight difference on application level based on from which IP request came. ...
2
votes
2answers
2k views

Hosts file vs DNS for data center management

What are the cons and pros of using hosts files (updated via Puppet for example) vs DNS for data center machines management? I'm looking to switch from the tedious IP scheme, but concerned about ...
10
votes
7answers
70k views

What can cause a DNS lookup to ignore a hosts file entry?

I'm having a DNS resolving issue that is affecting the performance of my locally hosted web site when browse it on my local machine. If I attach my network's DNS suffix to my local machine name when ...
14
votes
6answers
9k views

Per-user hosts file

Is there a way to define host aliases (like in /etc/hosts) on a per user basis, i.e. in a file /home/user/.hosts ? My primary objective is to easily share host aliases via rsync between the machines ...
3
votes
3answers
255 views

My DNS works! But, what is the simplest way to add something to it?

This is my current DNS example.com.db zone file. I followed a tutorial. It works, because when I point to this DNS from another server via resolve.conf, it will actually forward me to the right IP ...
0
votes
5answers
966 views

apache2, vhosts and servername directive

I'm running an apache development environment on my ubuntu desktop machine. When I start apache, I get the error "apache2: Could not reliably determine the server's fully qualified domain name, using ...
0
votes
1answer
194 views

Define hosts in Apache config instead of /etc/hosts?

Is it possible to configure a VirtualHost for Apache with custom hosts settings without modifying /etc/hosts? I want a VirtualHost to connect to a different host for testing then my live system. For ...
2
votes
5answers
3k views

How to copy /etc/hosts to all my machines?

import os, sys, time servers = ['dev','admin','db1'] for s in servers: cmd = 'scp /etc/hosts regular_user@%s:/etc/hosts' % s print cmd os.system(cmd) I have written this script to copy ...
0
votes
4answers
2k views

Wildcard *.local hosts to apache on OS X

I would like to route all my *.local or *.dev domains to a specific IP, either the IP of my Ubuntu VM or localhost. Is this possible? Can I use the /etc/hosts file? I am running Mac OS X Snow ...
0
votes
2answers
1k views

How can I edit/update hosts(etc/hosts) file using any programming language [closed]

Dynamically I want to edit/update hosts(etc/hosts) file to add domain. To edit hosts(etc/hosts) file require Admin privileged. Using Linux I can do this by this command sudo gedit /etc/hosts But ...
13
votes
5answers
2k views

Renting a dedicated, but getting a VPS. How to detect? [duplicate]

When renting a dedicated server, how can one be certain than he/she is not getting a VPS or some other virtual machine variant instead of a true dedicated hardware box? Which checks can be run (...
0
votes
3answers
96 views

Hosts available via IE only

Here's a situation I haven't seen before: I have a Windows Server 2008 R2 machine that can see other hosts only from Internet Explorer. I can't ping them, can't find them via tracert, etc. All other ...
2
votes
3answers
3k views

Redhat doesn't set my desired hostname on reboot

I have a redhat (EL5) server that I need to change the hostname on. I'm trying to put it back into a known state to help with server provisioning activities. As part of changing the hostname, I'm ...
3
votes
1answer
6k views

What's required for a nameserver to be registered?

I'm trying to change nameservers for some of my domains at GoDaddy, but I occasionally run into "Nameserver not registered" problems, and then I'm not allowed to set the nameservers. Here are the ...
15
votes
1answer
25k views

“My unqualified host name (foo.bar) unknown” Problem

When trying to start sendmail or send a mail using a wordpress plugin, this error shows up in the maillog: "My unqualified host name (foo.bar) unknown; sleeping for retry" After Googling the best ...
27
votes
10answers
63k views

Can I specify a port in an entry in my /etc/hosts on OS X? [duplicate]

Possible Duplicate: How to use DNS to redirect domain to specific port on my server I want to trick my browser into going to localhost:3000 instead of xyz.com. I went into /etc/hosts on OS X ...
2
votes
1answer
1k views

How do I setup a custom host in Linux Mint?

I want to redirect a host to local machine, in windows you get a hosts file. Is there something like this in Linux?
15
votes
12answers
30k views

HOSTS file being ignored

My (Windows XP, Professional, v2002, SP3) workstation is completely ignoring my hosts file. Here is the code in my hosts file: 127.0.0.1 localhost 172.17.1.107 wiki But, when I open a ...
0
votes
5answers
168 views

How to have a webserver resolve urls in php files?

Instead of having the client resolve URLS, I want to let my webserver do that. So ideally, I could turn this: <a href="http://www.long-domain-name.com/"> into this: <a href="http://domain/...
15
votes
3answers
30k views

Do entries in local 'hosts' files override both forward and reverse name lookups?

If I have the following entries in a hosts file: 192.168.100.1 bugs 192.168.100.2 daffy.example.com 192.168.100.3 elmer.example.com. Will IP->name resolution attempts by local utilies (I ...
4
votes
5answers
5k views

DHCP: Logging host declarations in log file

I am currently running ISC-DHCP server v3 on Ubuntu 8.04. What I am trying to do is log Who got what IP address when. Currently in the DHCP log file you can see the following: DHCPDISCOVER from ...
0
votes
1answer
87 views

How can I configure Debian workstations to be able to use a name provided by HP Laserjet printer

I have a LaserJet printer connected to the network (2300DN), which I would like to access using the name you set up in the Jet Direct options. It works perfectly fine on WinXP machines, I couldn't ...
4
votes
7answers
5k views

Using a Virtual Windows Machine to browse a local website: is it possible?

During our webdevelopment process, we often need to test the layout of our applications and websites in several browsers. Since running all of these browsers stand-alone is nearly imposible and ...
4
votes
3answers
28k views

Internet Explorer not bypassing proxy for local addresses

I've got a machine here that's running a website. It's only really a development machine but it has IIS on it for testing purposes. Problem is that when pages get loaded in internet explorer using the ...
0
votes
5answers
676 views

Best way to keep a hosts file updated

I have a situation where I have a dual homed VOIP server that uses two internet connections. The solution works fine except for one problem, when the primary internet connection goes down, so does ...
2
votes
4answers
407 views

How do I allow my computer to refer to itself as any ip on 192.168.1.*?

I'm using a Mac OS X, and I'm trying to begin using VirtualHost functionality with Apache2. I've created and loaded up a hosts file that looks like this: 127.0.0.1 localhost 192.168.0.71 ...
7
votes
2answers
343 views

How do I setup a HOSTS file on different operating systems?

Please provide examples of how this can be setup on client and server versions of various operating systems.