Config file templates

Discussion in 'Developers' Forum' started by till, Jul 30, 2005.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the first post in a series where i try to explain some internals
    of ISPConfig that might be of interest for developers and everyone
    interested in customizing his ISPConfig installation.

    --

    The ISPConfig setup is based on config files for the configured
    daemons like apache, bind, postfix etc. That means that none of
    these deamons is connected directly to the mySQL database.
    All daemons are reading their configuration from text files.

    The templates for these config files are located in the directory:

    /root/ispconfig/isp/conf/

    The templates have the name of the config file with the extension
    .master.

    Example: BIND primary domain template

    -----------------------------------------------------------------

    $TTL {DNS_TTL}
    @ IN SOA {DNS_NS1}. {DNS_ADMINMAIL}. (
    {SERIAL} ; serial, todays date + todays serial #
    {DNS_REFRESH} ; refresh, seconds
    {DNS_RETRY} ; retry, seconds
    {DNS_EXPIRE} ; expire, seconds
    {DNS_TTL} ) ; minimum, seconds
    ;
    NS {DNS_NS1}. ; Inet Address of name server 1
    NS {DNS_NS2}. ; Inet Address of name server 2
    ;

    <!-- BEGIN DYNAMIC BLOCK: mxrecords -->
    {MX_HOST} MX {MX_PRIORITAET} {MX_MAILSERVER}.
    <!-- END DYNAMIC BLOCK: mxrecords -->
    {DNS_SOA}. A {DNS_SOA_IP}
    <!-- BEGIN DYNAMIC BLOCK: arecords -->
    {A_HOST} A {A_IP}
    <!-- END DYNAMIC BLOCK: arecords -->
    <!-- BEGIN DYNAMIC BLOCK: cnamerecords -->
    {CNAME_HOST} CNAME {CNAME_ZIEL}.
    <!-- END DYNAMIC BLOCK: cnamerecords -->
    ;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

    -----------------------------------------------------------------

    Variables are enclosed in curly brakes.
    Example:

    {DNS_TTL}

    This will be replaced by the TTL of the DNS Record.

    Looped sections are enclosed in:

    <!-- BEGIN DYNAMIC BLOCK: NameOfTheSection -->

    ... LOOPED Content ....

    <!-- END DYNAMIC BLOCK: NameOfTheSection -->


    Many modifications can be done here without programming a single
    line of PHP code.

    To be continued...
     

Share This Page