You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tony Lavoie <fl...@students.depaul.edu> on 2002/09/10 07:09:59 UTC

[users@httpd] Help with VirtualHost config

Hello all,

A seemingly simple configuration is eluding me.. maybe because I'm not
understanding everything, maybe because something outside of apache isn't
working and I'm not seeing any error about it.

Anyway, first off, my configuration:
apache 1.3.26 on Linux (2.4 kernel),
static IP goes to my firewall/nat, which forwards :80 to the box (which is
a 192.168. IP on the LAN).
The static IP has a DNS name, and I also have a dyndns.org name which
resolves to the static IP.
The main configuration (before mucking with vhosts) correctly served pages
out of aliased directories, some of which were restricted for access to
other LAN 192.168 IP's.

What I'd *like* to work (but have not had complete success with thus far):
Have requests looking for the dyndns.org name use one of the aliased
directories as document root...
...but requests using the static IP, LAN IP, or ISP's DNS name to use the
main configuration.

So far, I can get it to do either of those, but only in mutual exclusion.

The only real changes I had done to my httpd.conf from when it was working
before was to add:

NameVirtualHosts *

<VirtualHost _default_:*>
</VirtualHost>

<VirtualHost *>
...
ServerName <something.dyndns.org>
</VirtualHost>

What I think I understood from the docs, FAQ, etc was that requests
matching something.dyndns.org would use that configuration, and everything
else would fall under the _default_, which with no enclosed info was just
the main server config.

Could someone please point out where I went wrong?

Much Appreciated,
-Tony


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org