...

View Full Version : how do I create a subdomain?



lukeprog
12-07-2007, 03:28 PM
I administer a small, Solaris 8 web server for a library. Our website is under /opt/csw/apache/htdocs/

How do I create a subdomain? For example, the main website is:

ecrl.lib.mn.us

I want to create:

pac.ecrl.lib.mn.us

(And actually, I just want that address to be a redirect to http://ecrl.sirsi.net/uhtbin/cgisirsi/x/0/0/49)

Any ideas?

wolfandcrow
12-07-2007, 04:08 PM
You have to add the sub domain name in your domain name hosting account control panel. Then point the sub domain to your server/other location.

So you can only make a sub domain name if you own the domain name or have access.

Spookster
12-07-2007, 06:09 PM
You have to add the sub domain name in your domain name hosting account control panel. Then point the sub domain to your server/other location.

So you can only make a sub domain name if you own the domain name or have access.

You have assumed they are using a commercial webhost that is using one of the various popular web based control panels. They are running their own webserver Apache on a Solaris box. It is probably unlikely they have purchased/installed one of those such as cPanel, etc.

In this case they need to edit their apache httpd.config file to add in the subdomain.

A quick search of google for "adding subdomain to apache" should result in some tutorials.

TheShaner
12-07-2007, 06:59 PM
In this case they need to edit their apache httpd.config file to add in the subdomain.
Yes, you will have to add a virtualhost to your httpd.conf file (or your httpd-vhosts.conf file if you are using it) looking for the subdomain.

In addition, you will have to modify your internal DNS records and add an (A) record pointing your subdomain name to your internal IP of your web server. And last, you will also need to modify the DNS record with whoever is hosting your domain name or redirection services to reflect your subdomain name pointing to your outgoing IP.

-Shane

lukeprog
12-07-2007, 08:22 PM
Thanks, guys.

I looked up tutorials for how to add a subdomain to apache. I added the following to my httpd.conf file:


##### Subdomain for pac.ecrl.lib.mn.us redirect #####
<VirtualHost pac.ecrl.lib.mn.us>
ServerAdmin postmaster@ecrl.lib.mn.us
DocumentRoot /opt/csw/apache/htdocs/pac
ServerName pac.ecrl.lib.mn.us
ErrorLog /opt/csw/apache/logs/error_log_pac
TransferLog /opt/csw/apache/logs/transfer_log_pac
</VirtualHost>

Now I have to change my local DNS settings? Where would that be on the server? What would I change? The Apache subdomain tutorials I found weren't clear to me.

And, I'd have to restart the Apache service, right?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum