Change default web-template

Discussion in 'Installation/Configuration' started by hagel, Aug 7, 2005.

  1. hagel

    hagel New Member

    Exactly which directory is used when creating new websites? I'd like to alter the default index.html which appears in newly created websites.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The standard index pages are in the directory:

  3. falko

    falko Super Moderator Howtoforge Staff

    That's where all the template files are, you can modify them. But you can also use the ISPConfig web interface to create individual index pages: Management -> Server -> Settings -> Other.
    Also each reseller can define individual index pages: ISP Manager -> [a reseller] -> Other.
  4. ajajaj

    ajajaj New Member

    How about adding extra files?

    We want to offer some PHP scripts pre-installed for selected customers, how do we have them get added when a new client is installed?

    for example, I want to install a directory called admin somewhere /root/ispconfig/isp/admin ??? and have it's contents copied to the web/admin folder of a new site.

    kinda like /etc/skel gets copied for new users in a standard debian system...

    hrm - could we use /etc/skel? will that work for the web#_username users?
  5. falko

    falko Super Moderator Howtoforge Staff

    You can customize /root/ispconfig/scripts/lib/config.lib.php (function web_insert()) to achieve this.
  6. t.roijers

    t.roijers Member

    Copy default index.php and folder


    I would like to copy a default index.php and image folder to the new created website.

    I would like to edit config.lib.php something like:

    exec("cp -R /var/www/template/* /var/www/$wichvar");

    Now, as you can guess i would like to know the exact var for $wichvar :)
    Also any suggestions where (line) to put it?

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Insert this at line 72:

  8. t.roijers

    t.roijers Member

    No success

    Hello Falko,

    Inserted this in the script, created a new website, but the copy command below doesn't copy the files from /var/www/template to the new website.

    any suggestions?


    Insert this at line 72:
    exec("cp -R /var/www/template/* /var/www/$web_path");
  9. falko

    falko Super Moderator Howtoforge Staff

    Maybe it's a better idea to insert that line in the make_docroot() function. For debugging purposes, you can kill the ispconfig_wconf daemon, create a web site, and then you run
    /root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
    on the shell. Any errors?
  10. t.roijers

    t.roijers Member

    config.lib.php default web template

    Hello Falko,

    Killed the deamon, started the script and this is all i see:

    ispconfig:~/root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php
    ispconfig:~/ispconfig/scripts/lib #

    No errors what so ever. But also no default template copied from /var/www/template to /var/www/$web_path

    This is where the copy command is now~:
    959 function make_docroot($doc_id,$hostname,$domainname,$web_quota,$update) {
    960 global $go_info, $mod;
    961 exec("cp -R /var/www/template/* /var/www/$web_path");

  11. t.roijers

    t.roijers Member

    forgot something

    After ispconfig:~/root/ispconfig/php/php /root/ispconfig/scripts/writeconf.php

    INSERT: 20

    No errors, no default index.php

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The script is working fine when you dont get any PHP errors.

    I guess you will have to debug your code by e.g. adding some echo statements to see whats going on.
  13. t.roijers

    t.roijers Member


    Indeed, the script is working fine.
    Problem was the $web_path var:

    exec("cp -R /var/www/template/* /var/www/$web_path");

    Should be:

    exec("cp -R /var/www/template/* $web_path/web");

    Tim Roijers
  14. Toucan

    Toucan Member

    Where do i find this file on ispconfig3?
  15. falko

    falko Super Moderator Howtoforge Staff

    ISPConfig 3 was rewritten from scratch, so that file doesn't exist there.
  16. Toucan

    Toucan Member

    That would explain why I can't find it. I've posted a similar thread to 3' forum so hopefully I'll find an answer there.

  17. QuetzalFirst

    QuetzalFirst Member

    Where and how I can define directory skeleton for client site? (ISPConfig 3)
    - webID
    -- cgi-bin
    -- log
    -- private
    -- ssl (what is this directory?)
    -- httpdocs (instead of web)
    -- httpsdocs
    -- subdomains
    --- sub1
    ---- cgi-bin
    ---- log
    ---- private
    ---- httpdocs (instead of web)
    ---- httpsdocs
    ---- some others​
    --- sub2
    --- ...​
    Thank you
    Last edited: Mar 22, 2015
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    This thread is about ISPConfig 2, thats a completely different software then ISPConfig 3. So nothing in this thread here applies to your server. If you have any questions about ISPConfig 3, then please post in the ISPConfig 3 forum.
  19. QuetzalFirst

    QuetzalFirst Member

    Hi! Sorry... Not clear... search for help in google and found this about directory creation

Share This Page