[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Pointing a Sub Domain To a directory
- Subject: Re: [cobalt-users] Pointing a Sub Domain To a directory
- From: Cody Watkins <codyw@xxxxxxxxxxxxxxxxx>
- Date: Fri Aug 25 15:31:20 2000
Yes,
Edit your http.conf and add the following line into it (then save):
Include /etc/httpd/conf/extra.conf
then create a file named extra.conf in the folder /etc/httpd/conf/
Then just include your subdomains in this file, and add the DNS Entries via
the control panel. But doing it this way, you don't have to add sub
domains in the control panel, and you can point them to any directory that
you want.
In extra.conf add as many sub domains you want. Example:
<VirtualHost 64.65.0.4>
ServerName sub1.yourdomain.tld
ServerAdmin admin
DocumentRoot /home/sites/site3/web/sub_domains/subdomain1
RewriteEngine on
RewriteCond %{HTTP_HOST} !^64.65.0.4(:80)?$
RewriteCond %{HTTP_HOST} !^sub1.yourdomain.tld(:80)?$
RewriteRule ^/(.*) http://sub1.yourdomain.tld/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
<VirtualHost 64.65.0.4>
ServerName sub2.yourdomain.tld
ServerAdmin admin
DocumentRoot /home/sites/site3/web/sub_domains/subdomain2
RewriteEngine on
RewriteCond %{HTTP_HOST} !^64.65.0.4(:80)?$
RewriteCond %{HTTP_HOST} !^sub2.yourdomain.tld(:80)?$
RewriteRule ^/(.*) http://sub2.yourdomain.tld/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site3/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
Hope this helps!
Sincerely,
Cody Watkins
________________________________________________
Paradox Web Hosting
codyw@xxxxxxxxxxxxxxxxxxxxx
www.paradoxwebhosting.com
At 05:52 PM 8/25/00 EDT, you wrote:
>Is there a way to do this with OUT creating another site for it?
>
>
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>To Subscribe or Unsubscribe, please go to:
>http://list.cobalt.com/mailman/listinfo/cobalt-users
>