Re: natted apache2 virtual hosts
From: David Efflandt (efflandt_at_xnet.com)
Date: 05/24/04
- Next message: jpd: "Re: Optical drive really necessary for a server?"
- Previous message: jpd: "Re: how to enable Xircom Ethernet+Modem card."
- In reply to: dave: "natted apache2 virtual hosts"
- Next in thread: dave: "Re: natted apache2 virtual hosts"
- Reply: dave: "Re: natted apache2 virtual hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 May 2004 18:06:15 +0000 (UTC)
On Mon, 24 May 2004 05:10:54 GMT, dave <dmehler26@woh.rr.com> wrote:
> Hello,
> I've got an apache web server behind a natted firewall. The server's IP
> address is 192.168.0.3, my external IP is for example sake 111.222.333.444,
> my configuration is below. Both the server and the router are Freebsd 4.9
> systems.
> My problem is i ssh to a machine outside my network, a linux box, then use
> lynx like so:
> www.site2.com
> it makes the http request to 111.222.333.444 but instead of delivering my
> www.site2.com page, i get my primary site, the www.site2.com might as well
> not exist.
> The maintainer of site2.com has set up a dns pointer externally pointing to
> my system, and on my internal dns server i've got a zone for site2.com. If i
> do:
> host www.site2.com
> i get the IP address of 192.168.0.3. And from my internal network if i do
> lynx like so:
> lynx www.site2.com
> it works fine.
> Here is my configuration.
>
> vhost.conf (included in httpd.conf where virtual host definitions are
> stored.)
You might want to try wildcard NameVirtualHost * and <VirtualHost *>
sections (without specifying port, since it is default port). But you may
need UseCanonicalName off. You might also need to use bogus main
ServerName, but that may have been due to my nameless worm catching
default vhost (if main ServerName matched one of the name based vhosts,
things did not work right).
> NameVirtualHost 192.168.0.3:80
><VirtualHost 192.168.0.3:80>
> ServerName www.site1.com
> ServerAlias site1.com *.site1.com
> DocumentRoot /usr/local/www/data
></VirtualHost>
>
><VirtualHost 192.168.0.3:80>
> ServerName www.site2.com
> ServerAdmin webmaster@site2.com
> DocumentRoot /usr/local/www/site2.com/data
> ErrorLog /usr/local/www/site2.com/logs/error_log
> TransferLog /usr/local/www/site2.com/logs/access_log
> ScriptAlias /cgi-bin/ "/usr/local/www/site2.com/cgi-bin/"
><directory /usr/local/www/site2.com>
> options ExecCGI Indexes SymLinksIfOwnerMatch
> AllowOverride AuthConfig Limit
></directory>
></VirtualHost>
>
>
> #httpd -S
> VirtualHost configuration:
> 192.168.0.3:80 is a NameVirtualHost
> default server www.site1.com (/usr/local/etc/apache2/vhosts.conf:2)
> port 80 namevhost www.site1.com
> (/usr/local/etc/apache2/vhosts.conf:2)
> port 80 namevhost
> www.site2.com(/usr/local/etc/apache2/vhosts.conf:8)
> Syntax OK
>
>
> #apachectl -t
> Syntax OK
>
> Any help appreciated.
> Thanks.
> Dave.
>
>
-- David Efflandt - All spam ignored http://www.de-srv.com/ http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
- Next message: jpd: "Re: Optical drive really necessary for a server?"
- Previous message: jpd: "Re: how to enable Xircom Ethernet+Modem card."
- In reply to: dave: "natted apache2 virtual hosts"
- Next in thread: dave: "Re: natted apache2 virtual hosts"
- Reply: dave: "Re: natted apache2 virtual hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|