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

learn more… | top users | synonyms

60
votes
9answers
114k views

hosts file ignored, how to troubleshoot?

The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods. Often, one decides to change the hosts file, and discovers ...
0
votes
1answer
20 views

How to host two web applications with different “domains” in IIS 8

I have setup to entries in my hosts file: 127.0.0.1 mymvcapp.dev www.mymvcapp.dev 127.0.0.1 mywebapi.dev www.mywebapi.dev In the first I want to host my mvc app and the second entry is for ...
0
votes
2answers
45 views

I need to set up a sftp server, that could use different keys, and use different directories for the same login, depending on the ip used

I got a problem, that I cannot solve myself. I tried to google it, but no satiscactory solution that i could find. I have a server that is available with let's say 3 different IP addresses (A,B,C), ...
0
votes
1answer
31 views

AWS EC2 Describe Instances - Filtering by Multiple EC2 Tags?

I'm attempting to dynamically create a hosts file mapping with all my ec2 instance private ip's, to use as the /etc/hosts on my ec2 remote ssh server. I have instances tagged with their normal "Name" ...
1
vote
2answers
219 views

Hosts.deny blocks whm access?

I have my hosts.allow and hosts.deny set up as follows: Allow: sshd: (my static ip) vsftpd: (my static ip) Deny: ALL : ALL but this blocks all access to WHM and cPanel? What else do I need to ...
-2
votes
2answers
36 views

I can't get my website to be enabled? [closed]

I have two websites: iq-dev.de and iq-dev.com iq-dev.de works without a problem and is also available through www.iq-dev.de. I have a cloud Server with linux installed and edit everything via ssh. ...
3
votes
3answers
339 views

Windows 10 Name Resolution skipping/ignoring subnet

This is a rather complex problem, but I'll try to make it easy to understand: I have three subnets. We'll call them 10.10.0.0/22, 10.20.0.0/22 and 10.30.0.0/16. I have two AD domains, but I don't ...
1
vote
1answer
26 views

“sub domain” in lnternal network

i have a small network under a Windows domain-controller. the server (Win2012) run a WebSite which is accessible by typing the machine-name (srv/). i want add a website with binding to sub-domain: ...
9
votes
3answers
207 views

Size Limit of /etc/hosts (Linux)

Does anyone happen to know what the theoretical size limit of /etc/hosts is on a Linux system before you might start to see degradation in performance? Furthermore, can anyone point me towards some ...
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, ...
1
vote
2answers
36 views

How do I redirect with Apache reverse proxy on server errors

I have several http and game servers on a network and currently use an Apache2 reverse proxy to divvy out traffic between domains and machines. I am getting a significant amount more traffic to one ...
0
votes
1answer
70 views

HOSTS file not overriding DNS

I have a Server 2012 R2 machine and I have added a hosts file entry for a hostname to point to an IP. However, when doing an nslookup, the HOSTS file does not override the result (from DNS). I can't ...
0
votes
0answers
10 views

Virtual Host Issue on 1&1 with Debian Server

I'm running a Debian 8 LAMP server with Apache Virtual Hosts configured. I've had it running for a couple years. I recently added a second site and config. When I modified my remote system on local ...
1
vote
1answer
83 views

MySQL Host / Host Table

So for better security, our website / network has been looking to lock down all of our SQL to IPs. What we originally were looking for was somewhere where I could whitelist all our ips, say 104.151....
0
votes
1answer
47 views

CentOS 6.5 Apache redirect to 127.0.0.1

I have to install a new CentOS Server v6.5 I already install httpd and want to access Apache Welcome Page by serverIP. But I get a timeout, so I stop iptables service for a moment. Now I get an 301 ...
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 ...
0
votes
0answers
545 views

Chef Server 12 reconfigure fails with RabbitMQ

After installing Chef Server 12 on CentOS 6.5 everything went well but now I've removed the premium addons that I've installed manually (using RPMs) there is an issue with RabbitMQ: *It might be ...
2
votes
1answer
70 views

Make Linux server route packets destined for its external ip to localhost

I've a router with a certain static ip a.b.c.d that's connected to a Linux server on one side and to the internet on the other. Accessing a software installed on the Linux server from outside using ...
1
vote
2answers
541 views

Using Ansible to provisioning users: Modify facts/expand hostvars?

First off, I apologize for the terrible title. I'm not entirely sure how to succinctly describe the problem. So here's my challenge. I'm working on provisioning database users and would like a ...
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 ...
1
vote
0answers
82 views

Samba shares don't work when mounted via host names from /etc/hosts

I have /etc/hosts file with this line 10.1.17.123 SAMBAWINSERVER I am trying to mount samba shares referencing server by name in the hosts file. I tried to mount it via regular mount command or /...
0
votes
1answer
813 views

windows hosts: how can I redirect HTTPS site?

I have that in my host 127.0.0.1 block.opendns.com It works when I use: http://block.opendns.com But does not work when I use: https://block.opendns.com Any idea how to use hosts with an HTTPS ...
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 ...
7
votes
1answer
7k views

Hostname to Localhost with Port - OSX [closed]

I am trying to run multiple Node.js web servers locally on my machine. Because the code I'm writing needs to reference a domain name I'd like to keep a convention of dev.myHost.com and point that to ...
1
vote
1answer
365 views

Apache log to one file for multiple domains with logrotate

I would like a solution to my problem where I have 100s of domains on an Apache server. I don't want a separate log file for each domain I want them to share a log file. This is easy enough if I don't ...
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 ...
1
vote
1answer
60 views

In /etc/hosts is there something special about the first hostname for any given line?

I know that the first one is said to be canonical, but I don't fully understand the practical implications. This question was triggered by the man page for hostname -f, specifically when it says: ...
0
votes
0answers
27 views

Trouble accessing FTP internally

I am currently running OS X Server 4. I have multiple websites (virtual hosts) set up with it. Lets call them domain1.com and domain2.com. Internally, they are both being run off of the same IP. Let'...
0
votes
2answers
179 views

Windows 2012 Server, DNS resolve host for client

I've been looking for way to resolve host name for client on Windows Server 2012, just like if I added it to hosts file of the client workstations running Windows 7/8. In hosts file I would add ...
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 ...
0
votes
1answer
502 views

Setting up my vhosts file correctly in WAMPServer [duplicate]

I am trying to setup an mobile app that I have received from another dev locally on my machine, this is a cordova based mobile app that is basically html5/javascript etc.. I have added the following ...
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 ...
0
votes
2answers
2k views

Sendmail Domain of sender address does not resolve. Unable to send any emails.

I've got myself in a muddle with Sendmail. I've newly inherited responsibility for an app that uses sendmail and I have no previous experience. I'm using Ubuntu Ubuntu 10.04.4 LTS. Recently we ...
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
1answer
113 views

hosts file entry for domain pointing to shared hosting account [closed]

I have hosting account which is on shared hosting server. My DNS is not able to resolve the server address. What should be entry in etc/hosts so that it resolves the correct server address? Few ...
0
votes
1answer
346 views

Redirect subdomain to an Apache Virtual Host

I have a website "example.com" hosted on a provider that allows me to manage my own DNS. I want example.com to point to the provider's IP address but I want "subdomain.example.com" to point on my own ...
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 ...
0
votes
3answers
1k views

SMTP relay to multiple hosts

We are in the process of switching our email from a locally hosted server to Google apps. We have a lot of users and I'd like to be able to switch them over one at a time so I don't get inundated with ...
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 ...
0
votes
1answer
2k views

warning: /etc/hosts.allow, line xx: host name/name mismatch

I've whitelisted my own domains in /etc/hosts.allow ALL: localhost, .domain.tld plus all of my IP adresses. I also have about 4k lines in /etc/hosts.deny. Everything works but I do not understand ...
0
votes
2answers
754 views

Configuring the hosts file to point to my server

I have a somewhat annoying problem in website development/deployment process; when I work locally on my server, the address of my program is localhost:8080/MYSERV/..., whereas when I deploy it, the ...
0
votes
1answer
44 views

How to configure DNS for website on one host other domain services on second host?

I want to achieve the following: mydomain.com/webmail, mydomain.com/forums, mail.mydomain.com, etc point to current host A And I wish to point mydomain.com to a new website host: www.mydomain.com, ...
7
votes
6answers
9k views

Can a long /etc/hosts file slow DNS lookup?

I'm facing a little question here. I have a long /etc/hosts file. (working in the web, so I'm hosting a lot of sites locally for developping). Let's says it is about 40, 50 lines long. All ...
1
vote
1answer
1k views

Use proxy like an /etc/hosts file

I want a forward proxy that basically overrides DNS like /etc/hosts would on a client machine. So when People go to Google.com (for example) the proxy sends the request to a specified IP address. I ...
1
vote
1answer
986 views

Simulate a DFS share for a user not on domain with a folder in path

I have a consultant whose computer is not on the domain and needs to access various network resources. Unfortunately while adding a computer to the domain is a difficult bureaucratic process (and ...
-1
votes
2answers
305 views

Hosts File Failover [closed]

My software uses DNS Name to connect to the Server. My Clients sometimes need to work off site and in such a case they use Hamachi to connect to the server. I would like to know if it is possible to ...
0
votes
3answers
108 views

map old windows server to new windows server

At the moment, I have 2 servers (serve1 and serve2). serve1 is old and data is small enough to move to serve2. serve1 = Win 2k3 serve2 = Win 2008 R2 The problem is I need to keep the serve1 name ...
1
vote
3answers
2k views

Apache 2.4 - 403 HTTP status code

I'm getting a 403 error message with Apache, in Debian Testing. Apache version: # aptitude show apache2 | grep -i version Version: 2.4.9-1 # ls -la /home/ total 28 drwxr-xr-x 4 root root ...
0
votes
1answer
132 views

Different DNS name resolution for same server [closed]

I am working on an internal facing wiki that is hosted on a linux box in the office that also holds our backup-server roll. The name of this server is 'backup-server' and DNS resolves this to the ...
2
votes
1answer
3k views

How to define multiple /etc/hosts entries with Puppet ENC?

I'm writing an External Node Classifier for my Puppet infrastructure, and I have the need to manipulate the /etc/hosts file on each node. The following (due to the duplicate key) is invalid YAML: --- ...