[CentOS] redirecting web requests from localhost

diegors at gmail.com diegors at gmail.com
Wed Aug 28 21:55:31 UTC 2013


IF (IF) is trying to get data by hostname, dnsmasq maybe could help. 
IF (IF) is by ip addres, problem still here. 

First he need understand how is working the app or wait to developer. 

I prefer lost 2 minutes with grep, that a lot of minutes with dnsmasq AND 2 minutes with grep later..


Diego Sanchez

Sent from my mobile

-----Original Message-----
From: Reindl Harald <h.reindl at thelounge.net>
Date: Wed, 28 Aug 2013 23:38:49 
To: CentOS mailing list<centos at centos.org>
Cc: <miguel_3_gonzalez at yahoo.es>; <diegors at gmail.com>
Subject: Re: [CentOS] redirecting web requests from localhost



Am 28.08.2013 21:49, schrieb "Miguel González" <miguel_3_gonzalez at yahoo.es>":
> I'm testing a server and try to simulate a server in production. We 
> have a SSL certificate and I have configured the test server with the 
> same servername as it is in production. To access it, I change the hosts 
> file in my laptop to reach the test server.
> 
> I have changed the hosts file and some 
> applications (ping, wget) they get the local IP address. However 
> nslookup and maybe our Java application (I didn´t have the programmer 
> available to debug it) are getting the production server IP

if a application makes a DNS request then it
asks DNS and not /etc/hosts - period

yum install dnsmasq
man dnsmasq

Am 28.08.2013 23:16, schrieb diegors at gmail.com:
> Could be hardcoded in your java app, by hostname or ip?

learn basics, see above

the application is not interested in /etc/hosts - why?
because /etc/hosts doesn't support record types like MX, TXT, SRV, SPF....

http://blog.defunct.ca/2009/09/29/postfix-etchosts/




More information about the CentOS mailing list