rbowen 00/09/09 11:54:14
Modified: htdocs/manual/vhosts examples.html Log: Added example of using two IP addresses in one VirtualHost section, since this was rather unclear before. Submitted by: Rich Bowen <[EMAIL PROTECTED]> Revision Changes Path 1.6 +33 -0 httpd-docs-1.3/htdocs/manual/vhosts/examples.html Index: examples.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/vhosts/examples.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- examples.html 1998/09/17 14:15:02 1.5 +++ examples.html 2000/09/09 18:54:13 1.6 @@ -224,6 +224,39 @@ <SAMP>111.22.33.55</SAMP> with an unknown or no <CODE>Host:</CODE> header will be served from <SAMP>www.otherdomain.tld</SAMP>. </BLOCKQUOTE> + +<LI><STRONG>Setup 3:</STRONG> + The server machine has two IP addresses (<SAMP>192.168.1.1</SAMP> + and <SAMP>111.22.33.55</SAMP>). The machine is sitting between + an internal (intranet) network and an external (internet) network. + Outside of the network, the name <SAMP>server1.domain.tld</SAMP> + resolves to the external address (<SAMP>111.22.33.55</SAMP>), but + inside the network, that same name resolves to the internal + address (<SAMP>192.168.1.1</SAMP>).<P> + + The server can be made to respond to internal and external + requests with the same content, with just one <CODE>VirtualHost</CODE> + section. + <P> + + <STRONG>Server configuration:</STRONG> + + <BLOCKQUOTE><PRE> + ... + NameVirtualHost 192.168.1.1 + NameVirtualHost 111.22.33.55 + + <VirtualHost 192.168.1.1 111.22.33.55> + DocumentRoot /www/server1 + ServerName server1.domain.tld + ServerAlias server1 + ... + </VirtualHost> + </PRE></BLOCKQUOTE> + + Now requests from both networks will be served from the same + <CODE>VirtualHost</CODE> + </UL> <HR>