[Cialug] Virtual hosts in Apache
Jeffrey C. Ollie
jeff at ocjtech.us
Fri Jun 1 12:35:55 CDT 2007
On Fri, 2007-06-01 at 12:26 -0500, Tim Wilson wrote:
> It's not quite working, maybe what I want is a little more
> complicated. Here's what I have:
> [...]
> Essentially, I'll be hosting both foo and bar on domain1.com (at least
> for a while) and domain2.com, but foobar will only be on domain1.com,
> and be on port 8080. Right now, I'm just testing domain1.com. If I
> go to foo.domain1.com (port 80), I get the correct page. If I go to
> foobar.domain1.com (port 80), I get what I expected for
> foo.domain1.com. If I go to foo.domain1.com:8080, I get what I
> expected for foobar.domain1.com:8080. What do I need to do to display
> an error if foobar.domain1.com (port 80) is entered? How do I get
> foobar.domain1.com:8080 to work, but not foo.domain1.com:8080? And I
> did get rid of the Port directive.
You need the NameVirtualHost directives. And unless you really need it,
I'd change all of the IP addresses to "*", that way it'll work no matter
what IP adresses are assigned to the system.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://cialug.org/pipermail/cialug/attachments/20070601/df1137eb/attachment.pgp
More information about the Cialug
mailing list