Web Hosting Talk







View Full Version : subdomain setup seems too easy


netastic
05-21-2001, 03:21 PM
i set up a virtual web site on my RaQ4r as a subdomain on my domain name (ambrosesoftware.netastic.net) for a customer to use. it instantly resolves properly. do i need to add an A record to my DNS or will my web server just figure this out on its own just like it seems to be doing now?

-Edward-
05-21-2001, 04:39 PM
I've never created an A record for a subdomain and all mine work fine.

netastic
05-21-2001, 05:04 PM
what about a C name? do i need create a C name? for a subdomain?

tymonhall
05-21-2001, 09:38 PM
I create A records just in case.

Just an FYI if you used the cobalt control panel to create the subdomain that counts as one of your 200 sites.

You can create a user account in the main domain and point your your subdomain to it. If you would like more details on how to set that up then email me. I will send you a copy of what I have done.

Chicken
05-22-2001, 12:59 AM
Why don't you post it so the board can benefit? I'm sure lots of users would be interested in knowing different tricks/tips that you guys run across.

tymonhall
05-22-2001, 03:42 AM
I would have but I was in a rush.

Here it is.

First in edit your /etc/httpd/conf/httpd.conf adding the line "include /etc/httpd/conf/include.conf". I would recommend placing this line after the last VirtualHost.

Second create a file /etc/httpd/conf/include.conf (you can use pico) and add the following lines for each site

Note: Everything that follows the # are just comments

<VirtualHost 192.168.1.1> #Virtual server IP
ServerName subname.yourdomain.com #subdomain
ServerAdmin admin
DocumentRoot /path/to/the/home/directory/
ServerAlias subname.yourdomain.com #subdomain
AddHandler cgi-wrapper .cgi #This part is optional
Addhandler cgi-wrapper .pl #This part is ottional
</VirtualHost>

Here it is, if you need help with it let me know. :)

Cael
05-22-2001, 07:00 AM
I am very interested to use mod_rewrite to deal with all the subdomains. But I can't get it works even after numerous tries. So maybe someone here can help ?

If I can get it works ...
All I need to do is to place a code within <virtualhost> , and every sub.domain.com will be pointing to domain.com/sub automatically.

Any expert to help me in this issue ?

netastic
05-22-2001, 09:27 AM
tymonhall, you mentioned 200 sites. if a RaQ4r has mostly small low traffic sites does it still cap out at around 200?

tymonhall
05-22-2001, 04:27 PM
I hear that a raq can support unlimited amount of sites but only can support 200 IP address. The more site the slower the server though.

Chris
07-03-2001, 11:46 AM
Will that work if you use sub-domain set up through control panel?

I was using index.html files that forward to any directory of their choice, but if that works I will use that from now on.

raylin
07-05-2001, 10:37 AM
Originally posted by tymonhall

<VirtualHost 192.168.1.1> #Virtual server IP
ServerName subname.yourdomain.com #subdomain
ServerAdmin admin
DocumentRoot /path/to/the/home/directory/
ServerAlias subname.yourdomain.com #subdomain
AddHandler cgi-wrapper .cgi #This part is optional
Addhandler cgi-wrapper .pl #This part is ottional
</VirtualHost>


Then, how to set up ScriptAlias ?

I trid, but when I typed http://sub.domain.com/some.cgi
I got file not found error.