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

Re: Problem setting up a subdomain



On Fri, Jun 08, 2012 at 02:58:57PM +0100, Keir Snow wrote:
> Not sure I follow sorry, where would I create this section? I thought
> by putting something in sites-available I was leaving the main config
> alone?
> 


I believe what Jochen is suggesting (and what I would recommend, b/c
it's what I do), is to have a vhost entry in sites-available (linked in sites-enabled),
for each domain and/or subdomain you use, including the toplevel domain,
rather than placing a distinct entry for the main domain in 
http.conf or apache2.conf or wherever you're doing that.

./tony

> Keir
> 
> On Fri, Jun 8, 2012 at 2:41 PM, Jochen Spieker <ml@well-adjusted.de> wrote:
> > Keir Snow:
> >>
> >> Been trying to set up a subdomain of my site, so I've created a config
> >> file in sites-available that looks like this:
> > -- snip
> >> I've then enabled it using a2ensite however it seems to override my
> >> default config file and serve the subdomain content when the main site
> >> URL is used.
> >
> > The mechanics of virtual hosts vs. main server config are a little bit
> > weird:
> >
> > http://httpd.apache.org/docs/2.0/vhosts/details.html
> >
> > If I were you, I would just leave the main server config alone and
> > create a VirtualHost section for all domain names I want to use.
> >
> > J.

-- 
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E

Attachment: signature.asc
Description: Digital signature


Reply to: