LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Richard Russell <richard@yellowgoanna.com>
  To  : <linuxsa@linuxsa.org.au>
  Date: Wed, 30 Apr 2003 11:20:22 +0930

Apache reverse proxy -- why does this even work?

Hi all, 

I have a Linux box running Apache, with NameVirtualHosts which are set up to 
be reverse proxies to a bunch of Windows boxes running Apache on a private 
network. The Linux box has two interfaces. 

An eg directive is: 

<VirtualHost domain.com>
    DocumentRoot /home/httpd/html
    ServerName domain.com
    ProxyPass / http://internal.int/
    ProxyPassReverse / http://internal.int/
    CustomLog /var/log/httpd/access_log common
</VirtualHost> 

The strange this is, that despite the fact that internal.int doesn't resolve 
on the linux box at all, it still works. I have checked nsswitch.conf, 
resolv.conf, yp (not running), nisplus (not running) and /etc/hosts, and 
can't find any mention of internal.int anywhere. 

Eventually, I did find it in a local copy of named. It's a master for .int, 
and has a zone file, with the correct information for internal.int in it. 
It's only listening on the internal (192.168) interface (not even 
localhost). If I run `dig internal.int @192.168.x.y`, I get the correct 
response. However, /etc/resolv.conf looks like this: 

[root@fw /root]#  cat /etc/resolv.conf
search int
#nameserver 192.168.x.y       <-- internal address, commented out
nameserver <provider's DNS> 

nscd isn't running. 

I can't see any NS related directives in httpd.conf. 

If i try to resolve internal.int from the command line, it doesn't resovle 
(unless I specify the DNS explicitly using dig or nslookup). 

No interfaces are configured to be dhcp. 


It shouldn't work!!! 

(one thing I haven't tested is stopping the named, or restarting httpd -- 
perhaps something has cached an old copy of /etc/resolv.conf... but what 
does this? I don't want to break it, as it's a production server) 


Cheers 

rr 

-- 
Richard Russell
Yellow Goanna P/L
m: +61 412 827 805
e: richard@yellowgoanna.com
w: http://www.yellowgoanna.com/

-- 
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.freenode.net
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page