Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 30th May 2013, 01:05
buffus buffus is offline
Junior Member
 
Join Date: Nov 2011
Posts: 18
Thanks: 8
Thanked 1 Time in 1 Post
Default How is the best practise create own structure for new client folder?

Hello,

I'm using now the ISPConfig 3.0.5.2 on Debian Wheezy.

When I create for new client-> new website, default structure of his folder is:

HTML Code:
cgi-bin/
log/
private/
ssl/
tmp/
web/
- stats
- .htaccess
- favicon.ico
- index.html
- robots.txt
webdav/
But I'd like build the own structure for client automaticaly e.g.

HTML Code:
app/
   libs/
   log/
   temp/
   www/
      - index.php

How is the best practise on ISPConfig 3.0.5.2 now?
Reply With Quote
Sponsored Links
  #2  
Old 30th May 2013, 09:34
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,041
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Your structure is not supported by ispconfig, if you want to use that you will have to go trough all code inside the directory /usr/local/ispconfig/ and adjust all oaths and then adjust all config files and templates that yre used on a ispconfig server for websites.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th May 2013, 10:08
buffus buffus is offline
Junior Member
 
Join Date: Nov 2011
Posts: 18
Thanks: 8
Thanked 1 Time in 1 Post
Default

Thank you. It is very laborious.

Or how to add only e.g. folder1/lib.php to private folder automaticaly?

/var/www/clients/client1/web1/private/folder1/lib.php
Reply With Quote
  #4  
Old 30th May 2013, 11:19
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,041
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Quote:
Originally Posted by buffus View Post
Thank you. It is very laborious.

Or how to add only e.g. folder1/lib.php to private folder automaticaly?

/var/www/clients/client1/web1/private/folder1/lib.php
The best way to do it in a upgrade safe way is to write a small ispconfig server plugin that subscribes for the "web_domain_insert" event. You custom plugin should have a name that is after "apache2" in alphabet to ensure that your plugin is run after the original apache2 plugin, name it e.g. "customapache2_plugin.inc.php" and put it in /usr/local/ispconfig/server/plugins-available and then activate it by adding a symlink in plugins-enabled directory. I recommend to take a look at the structure of the apache2 plugin to see how your plugin can subscribe to a event.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
buffus (30th May 2013)
  #5  
Old 2nd June 2013, 12:35
buffus buffus is offline
Junior Member
 
Join Date: Nov 2011
Posts: 18
Thanks: 8
Thanked 1 Time in 1 Post
Default

Thank you. I have this code and symlink in plugins-enabled is created.

But not working (It doesn't create the directory test.). What is wrong please?

PHP Code:
<?php

class customapache2_plugin
{
    public 
$plugin_name 'customapache2_plugin';
    public 
$class_name 'customapache2_plugin';

    
/**
    This function is called when the plugin is loaded
    */
    
function onLoad() {
        global 
$app;

        
//    Register for the events
        
$app->plugins->registerEvent('web_domain_insert',$this->plugin_name,'add_dir_test');
    }


    function 
add_dir_test($event_name,$data) {
        global 
$app;

        
//    Create folder test
        
if(!is_dir($data['new']['document_root'].'/test')) $app->system->mkdirpath($data['new']['document_root'].'/test');
    }
}
Reply With Quote
  #6  
Old 2nd June 2013, 13:42
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,041
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

The dode looks fine. Did you try to enable the debug loglevel, deactivate the server.sh cronjob and then run server.sh manually as root user?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create imap folder alex916 Installation/Configuration 12 9th April 2007 21:04
Cannot create client, reseller and hosting plan crapufish Installation/Configuration 22 15th March 2007 10:27
Rename folder -> create new folder equals contents of old folder BlueStream General 20 15th December 2006 03:32
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
isp manager - can't create reseller, client, hosting plan etc ahuen Installation/Configuration 13 2nd September 2005 20:49


All times are GMT +2. The time now is 10:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.