automatic dns entry when creating a site

Discussion in 'Installation/Configuration' started by spazio, Oct 11, 2009.

  1. spazio

    spazio Member HowtoForge Supporter

    After installing ispconfig 3 on ubuntu, everything seems to work ok. I've notice that when creating a new website, there is no automatic dns entries created in the dns section. On ispconfig 2 there was such a thing.

    How can i add a sript to automaticly create the following entries when i create a web site.

    www.example.com a x.x.x.x
    mail.example.com a x.x.x.x
    ftp.example.com a x.x.x.x
    mx 10 mail.example.com


    thanks in advance.
    spazio
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You will have to change the ispconfig sourcecode, e.g. the website_edit.php file in the sites module.
     
  3. spazio

    spazio Member HowtoForge Supporter

    The only files looking like website_edit.php is
    /usr/local/ispconfig/interface/web/sites/web_aliasdomain_edit.php
    /usr/local/ispconfig/interface/web/sites/web_domain_edit.php
    /usr/local/ispconfig/interface/web/sites/web_subdomain_edit.php

    Is that what you called site modules? If not where can i find this file?

    spazio
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to add code to all of them if you want dns records created when a domain, subdomain and aliasdomain is added.
     
  5. stanislavdavid

    stanislavdavid New Member

    Did you solve this problem?
    May you post the solution here, thank you
    Standa
     
  6. wkmpl

    wkmpl New Member

    Hi Till,

    in another post i read about the idea of an easy wizard for domains with template mechanism, so that also the dns entries could be created automatically if someone need this. Sounds great.

    Didn´t find this in the last ISPConfig version. So i found this post and maybe you could give us more details or some patch for creating e.g. an A-record automatically in dns zone xyz to the table dns_rr ?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Login to ISPConfig, go to the dns module and click on "ADD DNS zone" in the left menu to start the wizrad that creates the zones based on the template. The templates are in the dns module as well, seemeny item "templates".

    Thats all describe din detail in the manual, chapter 4.8.
     
  8. wkmpl

    wkmpl New Member

    Hi Till,

    didn´t meant the dns module, but the sites module. So if the client is creating a new website by pressing "add new website" it would be great - after saving - inserting automatically a new A-record for the given domain to the existing dns zone. Read somewhere that in ISPConfig 2 version there was a checkbox for that.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3 is a moduler multiserver controlpanel, the dns and sites module are not connected with each other. It is planned that we add a wizard to create sites and dns records and email domains in one steop in a future version.

    ISPConfig 2 is a different software then ISPConfig 3, nothing that you read about ispconfig 2 applies to ISPConfig 3.
     
  10. wkmpl

    wkmpl New Member

    Hi Till,

    Ok thanks, so until this, the best would be to educate the client to create the dns entries by themself. ;)
     
  11. MaddinXx

    MaddinXx Member

    Hi till

    Is this on the roadmap for 3.0.5 already or will it take some time?

    If no (not on the roadmap) I would try to create a plugin for this purpose, since I get a lot of requests from clients telling that they created a subdomain but it's not working - so it's definitely something I need too :)
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Its not on the roadmap for 3.0.5.

    ISPConfig has event based plugins for the inteface, they are located in /usr/local/ispconfig/interface/lib/plugins/. You can e.g. use a copy of the sites_web_domain plugin in that folder as basis for your new plugin and bind it to the "sites:web_domain:eek:n_after_insert" event like it is done in the exsiting plugin. Please note that new plugins get loaded during login, so after you created your plugin,logout and login again to get it loaded and activated.
     
  13. MaddinXx

    MaddinXx Member

    Hi till

    Me again. I have to check out the file you named - but wouldn't it also be possible with a normal plugin in "plugins-enabled"? Or is it just, that the other way would be cleaner?

    I created a very basic visual on how I thought this could work: http://drpln.gs/O4I94N

    What do you think? You have a better way?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPconfig is divided into 2 indepemndant parts, the server and the interface. The file I mentioned above is a plugin for the interface while the plugins-enabled directory contains plugins for the server. A server plugin can not insert the records in the interface, this has to be done in a interface plugin.
     

Share This Page