help with Virtual Hosts on Apache

Wade Smart wade at wadesmart.com
Wed Mar 28 23:59:21 UTC 2007


03282007 1854 GMT-6 DST

So for each Alias that I have, on my system it would be something like

ServerName siteA
ServerAlias siteA.localhost.com

ServerName siteB
ServerAlia siteB.localhost.com

etc?

wade


On Wed, 2007-03-28 at 15:05 -0300, Derek Broughton wrote:

> 
> There should be a name after ServerName.  So one of mine is:
>       <VirtualHost *>
>           ServerName plonevdc
>           ServerAlias plonevdc.pointerstop.ca
>       </VirtualHost>
> 
> 
> 
> > ServerAdmin webmaster at localhost
> > ServerAlias siteA.com
> > DocumentRoot /var/www/public_html/siteA.com
> >   
> > ScriptAlias /awstats/ /usr/lib/cgi-bin/
> 
> awstats is probably for your default site only - but maybe not.  
> 
> > Now just one question. This IS my personal computer so is the server
> > name the same as whats on my terminal, which is wadesmart at wadesmart: ~$
> > making my server name wadesmart?
> 
> Not likely.  Your default site should be using that servername or
> serveralias.
> 
> ServerName and ServerAlias are the domains you can specify to reach the
> virtual host.  ie, if you want to be able to use http://site1/ to get to
> site1 and http://site2/ to get to site2, then site1 & site2 need to be in
> your DNS (or /etc/hosts) as pointing to your local system and those will be
> used for ServerName.  If you want site1.com and site2.com to work, you need
> your DNS to resolve _those_ to your localhost, too (which gets more
> complicated), and you make those ServerAlias entries.  I assume, though
> I've never tried, that you can also use multiple ServerAlias directives to
> allow other ways to reach the same site (eg, site1, site1.com and
> www.site1.com all reaching the same domain).
> -- 
> derek
> 
> 





More information about the ubuntu-users mailing list