Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: A subdomain on a ubuntu server .

  1. #1
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    A subdomain on a ubuntu server .

    Hi...assuming i have a domain (say raafat.org) on a ubntu server with apache how can i get email.raafat.org or math.raafat.org or networking.raafat.org etc...

    thank you guys .

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: A subdomain on a ubuntu server .

    Having a subdomain is usually fairly straightforward. On the Ubuntu end, you can use virtual hosts, and on your DNS host you add an entry to point the subdomain to your server's public IP address.

    Hope this helps get you started, and that this will bump your thread so that someone who knows of a good tutorial can provide it.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by lisati View Post
    Having a subdomain is usually fairly straightforward. On the Ubuntu end, you can use virtual hosts, and on your DNS host you add an entry to point the subdomain to your server's public IP address.

    Hope this helps get you started, and that this will bump your thread so that someone who knows of a good tutorial can provide it.
    Hi...more explanation will be better .but as you said .

  4. #4
    Join Date
    Dec 2012
    Location
    Canada
    Beans
    187
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Perhaps more information might be forthcoming if you were a bit more specific about what you want to do with those subdomains. As lisati mentioned, the definition of those subdomains is controlled by the DNS entries for your domain. If they are all going to reside on the same public IP address then the entries would look something like

    raafat.org A 123.456.78.90
    email.raafat.org CNAME raafat.org
    math.raafat.org CNAME raafat.org
    ...

    Once that is done (and has propagated to the other DNS servers around the world) then any traffic sent to the subdomains will be directed to your public IP address. What happens next is up to you.

  5. #5
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by GordThompson View Post
    Perhaps more information might be forthcoming if you were a bit more specific about what you want to do with those subdomains. As lisati mentioned, the definition of those subdomains is controlled by the DNS entries for your domain. If they are all going to reside on the same public IP address then the entries would look something like

    raafat.org A 123.456.78.90
    email.raafat.org CNAME raafat.org
    math.raafat.org CNAME raafat.org
    ...

    Once that is done (and has propagated to the other DNS servers around the world) then any traffic sent to the subdomains will be directed to your public IP address. What happens next is up to you.
    Must i reserver email.raafat.org with all DNS servers around the world so i could use it ? Also with th rest of my entries ?

    Look i have (a assumation) raafat.org reserved around the world so that any traffic to raafat.org will be sent to my public ip,i want to create a email server (with IRedMail...someone@raafat.org) and (for that) i will create email.raafat.org .My question is: what are steps for doing that ?


    thank you .

  6. #6
    Join Date
    Dec 2012
    Location
    Canada
    Beans
    187
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by Raafat1991 View Post
    Must i reserver email.raafat.org with all DNS servers around the world so i could use it ? Also with th rest of my entries ?
    If you want the name 'email.raafat.org' to be accessible by other machines out on the Internet then a DNS entry must exist for it. You don't have to explicitly "reserve" it with every DNS server in the world; the DNS system will take care of that for you once the entry has been added to the authoritative DNS server for your domain (see below).

    Quote Originally Posted by Raafat1991 View Post
    Look i have (a assumation) raafat.org reserved around the world so that any traffic to raafat.org will be sent to my public ip,i want to create a email server (with IRedMail...someone@raafat.org) and (for that) i will create email.raafat.org .My question is: what are steps for doing that ?
    Your domain, 'raafat.org', has to be registered with an organization that is an accredited Domain Name Registrar. That organization will offer some kind of mechanism for updating your DNS entries. Check with them to see how you could get 'email.raafat.org' added to your DNS. (Many organizations like Go Daddy, Dyn Inc., etc. have "self-serve" options that let you log in to their website and change some of your DNS values yourself.)

  7. #7
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by GordThompson View Post
    Your domain, 'raafat.org', has to be registered with an organization that is an accredited Domain Name Registrar. That organization will offer some kind of mechanism for updating your DNS entries. Check with them to see how you could get 'email.raafat.org' added to your DNS. (Many organizations like Go Daddy, Dyn Inc., etc. have "self-serve" options that let you log in to their website and change some of your DNS values yourself.)

    What about a static IP need i that or a domain name is't enough ?



    thank you .

  8. #8
    Join Date
    Dec 2012
    Location
    Canada
    Beans
    187
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by Raafat1991 View Post
    What about a static IP need i that or a domain name is't enough ?
    A static IP address is not absolutely necessary, but it does make things simpler. Running a server on a dynamic IP address requires the use of a Dynamic DNS (DDNS) service to keep your DNS records updated with your current IP address.

    Also, if you are planning on running a mail server then it won't be able to send mail from your dynamic IP address directly to other mail servers because many of them will see that the mail is coming from a dynamic IP block and reject it (they'll assume that it's spam). In addition, you won't have a matching reverse DNS entry and that will further diminish the reputation of your mail server. So instead of sending messages directly you would have to set up your mail server to send all messages through another "legitimate" mail server (acting as a "smarthost" for you).

  9. #9
    Join Date
    Oct 2009
    Beans
    139
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Here is how to set up sub-domains. DNS does play a roll and as the information that has been given to you is real specially with email. You want to know how to setup sub-domains. Here is a little walk through that I use when I create a subdomain.

    Here we go:
    sub-domains is a good way to organize your website. example.com is what is called the parent domain. You could have many different parts to your website. For example you could have forums, books, music, really anything. so instead of having all your components to your website lay in the same directory /var/www you could go a step further and organize it. Here is an example of how you could structure /var/www using sub-domains

    /var/www/example.com { Main domain }
    /var/www/forums { forums }
    /var/www/music {if you have a music site or streaming}
    /var/www/books { digital books site}



    By using this type of structure to set up sub-domains all your website components eg: forums, music, books wont have to all be in the root directory of the website. Do you like www.example.com/forums? or would you rather see forums.example.com?

    Here is how we accomplish this.

    We need to navigate to
    Code:
    cd /etc/apache2/sites-available/
    Now we are going to create our sub-domain file.


    Code:
    sudo nano forums.example.com
    We will use a virtual host. Here is what it will look like.
    Code:
    <VirtualHost *:80> 
    ServerName forums.example.com
     ServerAlias www.forums.example.com
     DocumentRoot /var/www/forums/
         </VirtualHost> 
    <Directory /var/www/forums/>
                     Options -Indexes FollowSymLinks MultiViews                 
                    AllowOverride All                 
                    Order allow,deny                 
                    allow from all 
    </Directory>
    Next we will need to enable the site with apache2.
    Code:
    sudo a2ensite forums.example.com
    Now we need to reload apache for the changes to take place.
    Code:
    sudo /etc/init.d/apache2 reload
    Now all you need to do is create a folder in /var/www called forums eg; /var/www/forums

    In order for you to be able to access the forums.example.com you will need to modify DNS and add an A record. You Can go to the registar where you got the domain and register the sub-domain and point it to your server, you could use a third party dns such as zoneedit to handle all your dns needs for your domain





    Last edited by brent1975; March 4th, 2013 at 08:33 PM.

  10. #10
    Join Date
    Oct 2012
    Beans
    212
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A subdomain on a ubuntu server .

    Quote Originally Posted by brent1975 View Post
    Here is how to set up sub-domains. DNS does play a roll and as the information that has been given to you is real specially with email. You want to know how to setup sub-domains. Here is a little walk through that I use when I create a subdomain.

    Here we go:
    sub-domains is a good way to organize your website. example.com is what is called the parent domain. You could have many different parts to your website. For example you could have forums, books, music, really anything. so instead of having all your components to your website lay in the same directory /var/www you could go a step further and organize it. Here is an example of how you could structure /var/www using sub-domains

    /var/www/example.com { Main domain }
    /var/www/forums { forums }
    /var/www/music {if you have a music site or streaming}
    /var/www/books { digital books site}



    By using this type of structure to set up sub-domains all your website components eg: forums, music, books wont have to all be in the root directory of the website. Do you like www.example.com/forums? or would you rather see forums.example.com?

    Here is how we accomplish this.

    We need to navigate to
    Code:
    cd /etc/apache2/sites-available/
    Now we are going to create our sub-domain file.


    Code:
    sudo nano forums.example.com
    We will use a virtual host. Here is what it will look like.
    Code:
    <VirtualHost *:80> 
    ServerName forums.example.com
     ServerAlias www.forums.example.com
     DocumentRoot /var/www/forums/
         </VirtualHost> 
    <Directory /var/www/forums/>
                     Options -Indexes FollowSymLinks MultiViews                 
                    AllowOverride All                 
                    Order allow,deny                 
                    allow from all 
    </Directory>
    Next we will need to enable the site with apache2.
    Code:
    sudo a2ensite forums.example.com
    Now we need to reload apache for the changes to take place.
    Code:
    sudo /etc/init.d/apache2 reload
    Now all you need to do is create a folder in /var/www called forums eg; /var/www/forums

    In order for you to be able to access the forums.example.com you will need to modify DNS and add an A record. You Can go to the registar where you got the domain and register the sub-domain and point it to your server, you could use a third party dns such as zoneedit to handle all your dns needs for your domain






    Thank you man i have no an idea how can i thank you and every one posted something here...

    i think that idea become clear but is there any one have registered with a DNS server (just i want to know those steps) ?


    thank you .
    Last edited by Raafat1991; March 4th, 2013 at 10:17 PM.

Page 1 of 3 123 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
  •