On Apr 30, 8:26 pm, Nooze Goy <nooze...@pookmail.com> wrote:
> Mark Taylor wrote:
> > I think you should eliminate some of this...
>
> > ServerName mydomain.com
> > ServerAlias mydomain.com *.mydomain.com
>
> > Change it to this:
>
> > ServerName mydomain.com
> > ServerAliaswww.mydomain.com
>
> > And, both mydomain.com andwww.mydomain.commust be in your DNS records
> > properly.
>
> > Maybe it will fix your problem and maybe it won't. worth a try.
>
> Hey, thanks for the response. As noted in my reply to me, it's fixed -
> at least so far as http is concerned... Now, to get mail working, which
> may be a lot bigger PITA than this has been!
>
> Thanks again.
by removing virtualdocumentroot, you have effectively disabled
dynamically configured mass virtual hosting, which is very useful.
You can still have that AND your setup working, by having a redirect
in the folders associated with unneeded subdomains, so in the
mydomainname.com you have a simple script as index.php
<?php
$servername = 'mydomainname.com';
header( 'Location:
http://www.' . $servername . '/' .
$_SERVER["REQUEST_URI"] );
?>
I know its no fun, but it does mean you can keep DCMVH and yet alias
www.mydomainname.com with mydomainname.com leaving the other sub
domains unaffected. You then do not need the ServerAlias
www.mydomainname.com
directive in the vhost section or indeed any vhost section at all if
you dont need to alter the defaults.
One point though I notice you use *.mydomainname.com
I thought this was not possible. (Of course it wouldnt make sense with
DCMVH) but I didnt think apache honoured this, if anyone has a pointer
to some docs please could you post it here.