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

Re: [cobalt-users] subdomain hosting



> > i'd like to offer a friend a subdomain.mydomain.com hosting space. they
> > already have a user email account.
> >
> > but when i add subdomain.mydomain.com, the raq3 gui complains that there
> is
> > already a subdomain mapped to that domain.
> >
> > what's the work around?
> >
> > thanks very much
> >

1. Create 'A' records in DNS for mydomain.com   "www.subdomain.mydomain.com"
and  subdomain.mydomain.com

2. Create user "subdomain" in mydomain.com virtual site.

3. Create a file in /etc/httpd <anyname> I use mydomain.conf.
    Put the following text in mydomain.conf.
<VirtualHost 111.222.333.444>
ServerName www.subdomain.mydomain.com
ServerAdmin admin
ServerAlias subdomain.mydomain.com
DocumentRoot /home/sites/siteX/users/subdomain/web
RewriteEngine on
RewriteCond %{HTTP_HOST}             !^111.222.333.444(:80)?$
RewriteCond %{HTTP_HOST}             !^www.subdomain.mydomain.com(:80)?$
RewriteRule ^/(.*)                   http://www.subdomain.mydomain.com/$1
[L,R]
RewriteOptions inherit
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
</VirtualHost>

4. edit /etc/httpd/conf/httpd.conf
    add a line that states:
    "include domain.conf"  (without quotation marks)

5. restart httpd
DONE