Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

apache hostname resolution

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  authentication  
Author Message
Jeff

External


Since: Jul 10, 2007
Posts: 1



(Msg. 1) Posted: Tue Jul 10, 2007 5:58 am
Post subject: apache hostname resolution
Archived from groups: alt>apache>configuration (more info?)

I have the oddest situation. I have a test server on the LAN. I added
a host entry for www.myserver.com (actual name changed to protect the
innocent). I can ping www.myserver.com and my resolved address matches
the host entry. Life is grand, no?

/usr/sbin/ping www.myserver.com
PING www.myserver.com: 64 byte packets
64 bytes from 10.37.74.24: icmp_seq=0. time=0. ms

I have apache configured with a virtual host for www.myserver.com.
Watch what happens when I check my virtual hosts with httpd -S. I get
the PUBLIC internet address for www.myserver.com:

$ bin/httpd -S
VirtualHost configuration:
64.157.185.199:80 www.myserver.com (/usr/local/httpd/conf/vhosts/
80_myserver.com:5)
wildcard NameVirtualHosts and _default_ servers:
*:443 is a NameVirtualHost
default server www.myserver.com (/usr/local/httpd/conf/vhosts/
443_myserver.com:4)
port 443 namevhost www.myserver.com (/usr/local/httpd/conf/
vhosts/443_myserver.com:4)
*:80 is a NameVirtualHost
default server www.default.com (/usr/local/httpd/conf/
default.conf:4)

Okay, so I went to nsswitch.conf and TURNED DNS OFF. At this point,
resolver's only recourse is to use /etc/hosts. No matter, the answer
is EXACTLY the same:

$ bin/httpd -S
VirtualHost configuration:
64.157.185.199:80 www.myserver.com (/usr/local/httpd/conf/vhosts/
80_myserver.com:5)
wildcard NameVirtualHosts and _default_ servers:
*:443 is a NameVirtualHost
default server www.myserver.com (/usr/local/httpd/conf/vhosts/
443_myserver.com:4)
port 443 namevhost www.myserver.com (/usr/local/httpd/conf/
vhosts/443_myserver.com:4)
*:80 is a NameVirtualHost
default server www.default.com (/usr/local/httpd/conf/
default.conf:4)

Obvioulsy apache's getting that answer from DNS. That IP address is
not listed anywhere on the server. I don't understand where, how or
why it's resolving www.myserver.com. Any insight?

Jeff

 >> Stay informed about: apache hostname resolution 
Back to top
Login to vote
Mark Taylor

External


Since: Aug 24, 2006
Posts: 19



(Msg. 2) Posted: Tue Jul 10, 2007 10:15 am
Post subject: Re: apache hostname resolution [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jeff <joesiege.TakeThisOut@gmail.com> wrote in news:1184072284.934837.305940
@k79g2000hse.googlegroups.com:

> 64.157.185.199:80

Obviously, as a test server you are not using a hostname that actually will
resolve. And, httpd process likely does not use the conventional path of
resolving names, i.e. hosts file first, then dns, therefore the httpd -S
does not look at your hosts file.

The result is likely a default IP address from your ISP address block.


Not sure though... I've never had the occasion to do any tests on that.



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

 >> Stay informed about: apache hostname resolution 
Back to top
Login to vote
#2pencil

External


Since: Jul 12, 2007
Posts: 2



(Msg. 3) Posted: Thu Jul 12, 2007 10:21 am
Post subject: Re: apache hostname resolution [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Is it possible that the results are simply cached?

Try flushing your DNS (resolved) cache & seeing if you get the same
results.

==========================================================
How to Flush DNS in Linux:
/etc/rc.d/init.d/nscd restart

==========================================================
How to Flush DNS in Microsoft Windows:

C:\>ipconfig /flushdns

==========================================================
How to Flush DNS in Mac OSX:

bash-2.05a$ lookupd -flushcache

-#2pencil-
http://www.akroncdnr.com
 >> Stay informed about: apache hostname resolution 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache & Hostname - Hello I have some problems to understand the "connection" between the apache webserver and the hostname I use for my machine. I am using Redhat 9 My hostname is "acer" since I have an acer notebook. I had to add following "map...

Unknown Host (Name resolution problem within Apache) - I'm trying to do a ping on a cgi (bash) file, very simple and it does works on shell, but when trying to run it trough apache pings says (in apache's error_log that www.google.com (as an example) it's an unknown host) I tried on a commercial web server....

Hostname Problem with Apache - Hi there I recently compiled my gentoo Linux and installed Apache via emerge. Everything works fine except the following problem: I've setted up a NIS Domainname for my linux box called tux.home.lan. Every PC on my Network got a pcname.home.lan domain....

domain forwarding / apache responding with domain name ins.. - Hi group, trying to figure out what I am doing wrong.. or what is left to do.. situation: got domain with provider a (lets call them godaddy), they forward my domain to my local box (firewall / webserver). domain is called 'mydomain.com' (example)...

Block fake/phony Hostname/IP address' from Apache - I would like to block hostname/IP address that cannot be resolved via DNS. I see that SetEnvIf Remote_Host or Server_addr might be used to limit this via some .htaccess allow/deny via env!=good_host_via_DNS ???
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]