Re: Re: Enabling SSL on VirtualHosts Revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 18, 2009 at 12:06 PM, Jonathan Mast
<jhmast.developer@xxxxxxxxx> wrote:
> Frank, I've always used the ServerName directive, here's what my configs
> look like:
> NameVirtualHost foo.mysite.com:80
> <VirtualHost foo.mysite.com:80>
>     ServerName   foo.mysite.com
>
> </VirtualHost>
>
> NameVirtualHost foo.mysite.com:443
> <VirtualHost foo.mysite.com:443>
>     ServerName   foo.mysite.com
>
>     SSL Stuff...
> </VirtualHost>
>
> My question was specifically why putting the hostname as opposed to the addr
> in the NameVirtualHost was discouraged in the docs (they don't explain it
> any further)?

It's just unnecessarily confusing, because anyone looking at yout
config needs to know what set of addresses that resolved to when you
started your webserver.   It's also going to mysteriously send
requests to the base server config, or other vhosts, when you get a
request for that hostname that arrive on a different interface.

Most people who a) have vhost trouble and b) put hostnames as the
first parm in VirtualHost are misunderstanding name-based virtualhosts
configuration.  Most of them don't even need to discriminate between
IP addresses at all, and should just have *:port.

-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux