Site Skeletons

Discussion in 'Feature Requests' started by rbartz, Apr 13, 2006.

  1. rbartz

    rbartz Member

    How about programming in the site creation script that would look for a directory in /root that could contain a "user-defined" site skeleton, and copy them onto each new site. A "site skeleton" would be defined as an optional set of files created by the host admin according to his idea of the standard site that wouldn't be overwritten by an ispConfig update.

    When a site was setup, the script would look for the site skeleton directory, say /root/skeleton/ and if there were any directories or files there, it would copy them all into the new site with the same permissions and then chown them appropriately. If no directory existed, the script would just go on.

    As little as a custom index.html page could be done, or cgi scripts, php info scripts, host policy and use pages, images.... as much or as little as the host admin wanted could be added on setup.

    Richard
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You can create custom standard indexpages using the ISPConfig web interface.

    You can put standard CGI scripts into /root/ispconfig/standard_cgis, and when you enable "Standard CGIs" for a web site, these CGI scripts will be copied to the cgi-bin folder of the new web site.
     
  3. rbartz

    rbartz Member

    Thanks for that information Falko. :) That does take care of the usual standard index page and the cgi scripts.

    We install some other things on our "other server" like links to realaudio folders and phpmyadmin and httpd logs, a PHP info page, the always missing favicon.ico, images, a standard robots.txt page and so on. I guess I was thinking in terms of these kind of things.

    Another way to do that might be a choice in the site setups to install custom content by running a user-defined script that could be configured in server settings. That would make it optional and entirely up to the server admin what, where, and if his content was added to a site... and give him total control over and responsibility for how it installed. And it could allow him to use the site setup vars such as user name, root directory and so on.

    What do you think?

    Richard
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Sounds interesting. We can put it on our To-Do list, but don't expect it to come soon - we're always short of time... :rolleyes:
     
  5. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    Thumbs up! Yeap, been able to use a custom script for setting up a new website would be really awsome... :)
     
  6. TobiasTM

    TobiasTM ISPConfig Developer ISPConfig Developer

    This would be a very nice option. ;)
     
  7. BèrKessels

    BèrKessels New Member

    I need symlinks instead of dirs

    Because I run my sites off a single codebase, I don't want to create the ./web dirs for certain users/a certin hosting plan.

    Now, I run a commandline script that moves the dir away, and places a symlink instead. But it sounds a proper skeleton will solve my case too.
     
  8. SamTzu

    SamTzu Member HowtoForge Supporter

    Web Skeletons

    I like the idea of having different skeleton directories for different CMS.
    I would name them like this...

    ./web/guppy
    ./web/joomla
    ./web/drupal

    etc.

    This would really speed things up.
    Of cource most CMS would still need a way to clone the database somehow.

    I'd also like a way to copy the hostingplans & invoices from client to client.
    That is making too much manual work. Is there a way to manually copy them in the OS level? I tried to locate those files but failed.

    Sam
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Hosting plans and invoices are not files, they are records in the database. If you want to copy them, you will have to copy the corresponding permission records in isp_nodes too and you might have to adjust some values.
     
  10. SamTzu

    SamTzu Member HowtoForge Supporter

    Copy stuff

    Ok, makes sense.
    Thats why there is no such feature :)

    Sam
     
  11. SamTzu

    SamTzu Member HowtoForge Supporter

    Blip.
    Time to wake this thread...
     
  12. geareddesign

    geareddesign New Member

    Can this be done with Apache Directives + Hostingplan?

    I am attempting to set up an automated creation of sites from an existing install of Drupal. Would this work?

    1) Make a directory /etc/apache/vhost_includes/
    2) Make a text file cms.conf inside this directory which contains the rewrite rules you want to add to the vhost.
    3) In the apache directives field in ISPConfig you insert: Include /etc/apache/vhost_includes/drupal.conf
    4) Save as a Hostingplan Drupal

    Code:
    # web-N is the actual website
    
    # Enable .htaccess on the website
    
    <Directory "/var/www/web-N/web/">
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    
    # set up the site directory
    # copy needed files from ~/drupal/base)
    
    cp /var/drupal/base/* /var/www/web-N/web/
    
    # make the file directory
    
    mkdir /var/drupal/files/web-N
    chmod ug+w /var/drupal/files/web-N
    
    # set up some symlinks
    
    ln -s /var/drupal/includes /var/www/web-N/web/includes
    ln -s /var/drupal/misc /var/www/web-N/web/misc
    
    ln -s /var/drupal/modules /var/www/web-N/web/modules
    ln -s /var/drupal/profiles /var/www/web-N/web/profiles
    
    ln -s /var/drupal/themes /var/www/web-N/web/themes
    ln -s /var/drupal/sites /var/www/web-N/web/sites
    ln -s /var/drupal/sites/all /var/www/web-N/web/sites/all
    ln -s /var/drupal/files/web-N /var/www/web-N/web/files
    
    # make the site file and edit it
    
    mkdir /var/drupal/sites/web-N
    cp -r /var/drupal/sites/default/* /var/www/web-N/web/sites/web-N/
    
    # append some stuff to the end of the new settings file
    echo "\$conf = array('file_directory_path' => 'files/web-N', 'file_directory_temp' => 'tmp');" >> /var/www/web-N/web/sites/web-N /settings.php
    References:
    http://www.howtoforge.com/forums/showthread.php?t=907
    http://justinhileman.info/blog/2007/06/a-more-secure-drupal-multisite-install
     

Share This Page