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

Re: [cobalt-users] RE How to make a sub domain?



On Friday 01 February 2002 11:12 pm, alan@xxxxxxxxx wrote:
> I have checked out the FAQ supplied by Menno at
>
> >Check http://www.uk2raq.com/raqfaq/raqfaqshow.php?faq=62
>

The above instructions do not create a sub domain, they create a new virtual 
site, maybe a pseudo subdomain, NOT a subdomain

I have repeated the following instructions which I have posted several times.
I have maybe 30 or 40 subdomains created on RaQ2, RaQ3 and RAQ4 servers, 
using these instructions and they all work just fine.

These instructions create a REAL sub domain, if the virtual site is a front 
page site, front page will see the subdomains when the site is edited.

[1] Create a user subdomain in thedomain. 
    subdomain is the name for the sub domain in thedomain virtual site.

[2] Create 'A' records in DNS for thedomain.com   
     www.subdomain.thedomain.com
     subdomain.thedomain.com

[3] Create a file in /etc/httpd <anyname> I use thedomain.conf.  Put the 
    following text in the file thedomain.conf. 

    <VirtualHost 111.222.333.444>
    ServerName www.subdomain.thedomain.com
    ServerAdmin thedomain-admin
    ServerAlias subdomain.thedomain.com
    DocumentRoot /home/sites/siteX/users/subdomain/web
    RewriteEngine on
    RewriteCond %{HTTP_HOST}             !^111.222.333.444(:80)?$
    RewriteCond %{HTTP_HOST}             !^www.subdomain.thedomain.com(:80)?$
    RewriteRule ^/(.*)     http://www.subdomain.thedomain.com/$1 [L,R]
    RewriteOptions inherit 
    AddHandler cgi-wrapper .cgi
    AddHandler cgi-wrapper .pl
    </VirtualHost>

    NOTE: In the above container replace subdomain, thedomain-admin, 
    thedomain, and 111.222.333.444 with the actual names (values)
    Add any other AddHandler types you might need.

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

    NOTE: Place this line after the server <VirtualHost> container.
    This allows errors to resolve to the server domain instead of
     one of the sub domains

[5] reload httpd 
     RaQ3 - RaQ4 /etc/rc.d/init.d/httpd reload
     RaQ2  /etc/rc.d/init.d/httpd.init/ reload

DONE

-- 
Gerald Waugh
Registered Linux User 255245
Register at http://counter.li.org