Building Ubuntu Server 12.04.4 - domain & email re-direct

Discussion in 'Server Operation' started by [email protected], Feb 18, 2014.

  1. danhansen@denmark

    [email protected] Member HowtoForge Supporter

    Building Ubuntu Server 12.04.4 - domain & email re-direct:

    Want to build web-server. A stand Only webserver running 1 website with some special functions. So what do I need, please point me in the right direction.

    Function 1.:
    I want to be able to create subdomains based on one particular domain e.g. apollo2.tld, which links to a url.

    Ex. 1.
    enter "danhansen" which creates the subdomain "danhansen.apollo2.tld"
    enter "url" which the subdomain "danhansen.apollo2.tld" links to, e.g. html://tdcclient.webcust.domaindk.very_long_url.domain.tld

    So that you can create subdomains on a html/php site by entering the data mentioned above in to form fields.

    Function 2.:
    I want to be able to create email addresses based on the same domain, which links to another email address

    Ex. 2.
    enter "danhansen" which creates the email address "[email protected]"
    enter "email address" which the email address "[email protected]" links to, e.g. [email protected]

    So that you can create a email redirect on a html/php site by entering the data mentioned above.

    A. I know I need to start building a webserver (apache2), with sql (mysql), dns (bind9), mail-server (postfix?), php, perl? (form fields). But, is there a better way to do it, than installing separate programs? Would a LAMP server with some additions be a good start?
    B. I know I need to make a database, for the input. The data for the subdomain, "danhansen" and the data for the email address redirect.
    C. I don't need to install IMAP/POP3 server because the mails are being redirected (I'm pretty sure ;))
    D. I can use CNAME record to make a redirect, but do I make a script to modify DNS records or is there a smarter way to do it? Is it possible to input the data into a database and the somehow make this manipulate DNS-records for a URL and for a email?

    I know there's a lot of these kind of sites, but I need this web-server for a project of mine. So if anybody will point me in the right direction.

    Any kind of suggestions will be greatly appreciated.
    Last edited: Feb 18, 2014

    JESUSSAVES New Member

    Do you have ISPConfig 3 installed with the Ubuntu 12 Perfect Server? Search this site for it. Very stable installation and the control panel allows you to do everything you're trying to do.
  3. danhansen@denmark

    [email protected] Member HowtoForge Supporter

    Hi J,

    Yes I have ;) I was writing this in that forum and got some help, but what is your suggestion? How would you do this? I'm still reading an online book to learn, but please let me here how you would do it ;)

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Just install ispconfig exactly as decsribed in the perfect setup guide, then add a email domain and then add a email alias where you enter your external address in the target email address field.

    If you want to add such aliases from your own website, use the ispconfig remote api to add them in ispconfig instead of adding them manually. Same applies for the subdomains / websites.
  5. danhansen@denmark

    [email protected] Member HowtoForge Supporter


    Thanks.. The problem is the DNS right now. But this I will place in our thread. That's where it's relevant.. ;)

Share This Page