Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: 10.04server: SubDomains

  1. #1
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    10.04server: SubDomains

    Hey wondering if anyone knows how i can set up sub domains on my site.

    currently have my site working fine, but would like sub domain option.


    >> Any suggestions on how to accomplish this please post.

    Current Software installed:

    Bind9
    dhcp3

    >> Site works fine just need to know how to edit these and make sub-domains.

    thanks, Paul

  2. #2
    Join Date
    May 2006
    Beans
    45

    Re: 10.04server: SubDomains

    Curious about your post I did a quick google:

    http://lani78.wordpress.com/tag/dhcp/

    seems to have what you need.

    You're setting up a hosting co -like system with sub-domains on the server?

  3. #3
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,025
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04server: SubDomains

    Quote Originally Posted by jvin248 View Post
    http://lani78.wordpress.com/tag/dhcp/
    seems to have what you need.
    nope, that's not it


    Quote Originally Posted by bfh View Post
    Hey wondering if anyone knows how i can set up sub domains on my site.
    have a look at
    http://www.zytrax.com/books/dns/ch9/delegate.html

  4. #4
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    Re: 10.04server: SubDomains

    Quote Originally Posted by jvin248 View Post
    Curious about your post I did a quick google:

    http://lani78.wordpress.com/tag/dhcp/

    seems to have what you need.

    You're setting up a hosting co -like system with sub-domains on the server?

    pretty much if i understand u right.

    but to clarify:

    have a domain name ei: example.com

    wants to add subdomains ei: myfirst.example.com

    all on one server.

    gonna take a look @ this, kind of sceptical of using the guide though, some guides work, then you do 1 thing extra that someone else posted and whole system crashes ~_~

    had that happen to me quite a bit

    but thanks for link tried finding one like this for 4 hours now, couldnt find anything.


    any more input will be appreciated


    Edit: Well i did read that tutorial, unless I'm blind its not what im looking for.

    but thanks

    Quote Originally Posted by koenn View Post
    nope, that's not it



    have a look at
    http://www.zytrax.com/books/dns/ch9/delegate.html
    This looks like something i need -- ty.


    Edit:

    Hey im skeptical of this configuration, last time i made the file named.conf, bind crashed on me >

    is this the only way ?


    thanks




    Edit Also, not sure how to edit the bind files correctly ~ so any 1 can help to further the explanations go ahead and psot
    Last edited by bfh; February 18th, 2011 at 12:05 AM. Reason: update

  5. #5
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    Re: 10.04server: SubDomains

    Edited Post above a Few times.


    Just wondering if "bind" configuration the best way to go, and will i need to edit my
    dhcp3 files ?.


    Also, Need some clarification on the editing not sure where to start ~, maby a more
    noob style tutorial would be best -- searching tutorial section atm.

  6. #6
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    Re: 10.04server: SubDomains

    Okay I better start off from scratch.

    Here Will explain all my settings currently on my server. Need help editing this though:

    Settings on DHCP3:

    dhcpd.conf

    Code:
    ddns-update-style none;
    
    option domain-name "thesgc.ca";
    option domain-name-servers 208.67.222.222,208.67.220.220;
    
    default-lease-time 86400;
    max-lease-time 604800;
    
    authoritative;
    subnet 192.168.0.0 netmask 255.255.255.0 {
       range dynamic-bootp 192.168.0.2 192.168.0.75;
       option subnet-mask 255.255.255.0;
       option broadcast-address 192.168.0.255;
       option routers 192.168.0.1;
    }
    Settings On Bind9.

    named.conf

    Code:
    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
    // structure of BIND configuration files in Debian, *BEFORE* you customize 
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local
    
    include "/etc/bind/named.conf.options";
    include "/etc/bind/named.conf.local";
    include "/etc/bind/named.conf.default-zones";
    named.conf.local

    Code:
    // Do any local configuration here
    //
    
    // Consider adding the 1918 zones here, if they are not used in your
    // organization
    //include "/etc/bind/zones.rfc1918";
    # This is the zone definition. replace example.com with your domain name
    zone "example.com" {
            type master;
            file "/etc/bind/zones/thesgc.ca.db";
            };
    
    # This is the zone definition for reverse DNS.
    #replace 0.168.192 with your network address
    #in reverse notation - e.g my network address is 192.168.0
    zone "0.168.192.in-addr.arpa" {
         type master;
         file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
    };
    named.conf.options


    Code:
    options {
            directory "/var/cache/bind";
    
            // If there is a firewall between you and nameservers you want
            // to talk to, you may need to fix the firewall to allow multiple
            // ports to talk.  See http://www.kb.cert.org/vuls/id/800113
    
            // If your ISP provided one or more IP addresses for stable 
            // nameservers, you probably want to use them as forwarders.  
            // Uncomment the following block, and insert the addresses replacing 
            // the all-0's placeholder.
    
             forwarders {
                     208.67.222.222;
                     208.67.220.220;
             };
    
            auth-nxdomain no;    # conform to RFC1035
            listen-on-v6 { any; };
    };
    rev.0.168.192.in-addr.arpa

    Code:
    @ IN SOA newNetwork.thesgc.ca. admin.thesgc.ca. (
                            2006081401;
                            28800; 
                            604800;
                            604800;
                            86400 
    )
    
                         IN    NS     newNetwork.thesgc.ca.
    18                   IN    PTR    thesgc.ca
    Final Setting:

    /etc/resolv.conf

    Code:
    nameserver 192.168.0.1


    I hope that enough Information For someone to help me out.

    >> I Followed The Following Tutorials // guides to set up my web site.

    >>http://ubuntuforums.org/showthread.php?t=236093 << I just did what the first post
    specifies, before i did go and try to do what the 3rd or 4th post said, resulted in dhcp3 crashing.

    >>http://ubuntuforums.org/showthread.php?t=236093 << This guide is very good also, just followed the first post nothing else.

  7. #7
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    Re: 10.04server: SubDomains

    Sub-Domains now work

    need to figure out how to have use the www folder properly. (for the domain // sub-domain)

    Apache2 is installed.

    lmk if u find a guide on this, i had one earlier gonna search.

  8. #8
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,025
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04server: SubDomains

    https://help.ubuntu.com/8.04/serverguide/C/httpd.html

    you'll create 2 vhost definitions ('sites').
    Use the ServerName directive to indicate with domain they correspond to
    Let the DocumentRoot of each vhost point to a specific directory (eg subdirs of /var/www)

  9. #9
    Join Date
    Apr 2010
    Location
    Toronto
    Beans
    32
    Distro
    Ubuntu

    Re: 10.04server: SubDomains

    Quote Originally Posted by koenn View Post
    https://help.ubuntu.com/8.04/serverguide/C/httpd.html

    you'll create 2 vhost definitions ('sites').
    Use the ServerName directive to indicate with domain they correspond to
    Let the DocumentRoot of each vhost point to a specific directory (eg subdirs of /var/www)

    ty was using this guide from the start, its really good, but i ran into a snag ~

    Getting this error on restart of apache:

    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    Here my new sub-domain apache Code:

    Code:
    <VirtualHost *:80>
            ServerAdmin 
    
            DocumentRoot /var/www/boye
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/boye/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            <Directory "/usr/lib/cgi-bin">
                    AllowOverride None
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            </Directory>
    
            ErrorLog /var/log/apache2/error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
    
            CustomLog /var/log/apache2/access.log combined
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
    </VirtualHost>
    hopefully the problem is here not somewhere else.


    Fixed With Following: http://aslamnajeebdeen.com/blog/how-...rror-on-ubuntu


    Edit:
    Going To need some help...

    Apache working fine, not sure where the problem origin is ~ every thing works fine.

    bind9 runs smooth
    apache2 runs good also


    but when i try loading up a subdomain, only the information in that is loaded is the
    default file.

    /var/www/index.html

    does not load my sub domain script i want:

    /var/www/boye/index.html

    any ideas ?
    Last edited by bfh; February 18th, 2011 at 10:35 PM.

  10. #10
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,025
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04server: SubDomains

    the fix you point to is to set the ServerName to localhost. That's wrong for your case, and its the reason yuou get the default site.

    Like I said:

    you'll create 2 vhost definitions ('sites').
    Use the ServerName directive to indicate with domain each vhost corresponds to

    read more here
    http://httpd.apache.org/docs/2.0/mod...tml#servername

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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