Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do I create a subdomain?

    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?
    - Luke Muehlhauser

  • #2
    New Coder
    Join Date
    Oct 2007
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.
    Last edited by wolfandcrow; 12-07-2007 at 04:11 PM.

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by wolfandcrow View Post
    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.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Quote Originally Posted by Spookster View Post
    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

  • #5
    New Coder
    Join Date
    Mar 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, guys.

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

    Code:
    ##### 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?
    - Luke Muehlhauser


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •