Skeleton directory creation...

Discussion in 'Installation/Configuration' started by QuetzalFirst, Mar 23, 2015.

  1. QuetzalFirst

    QuetzalFirst Member

    Where and how I can define directory skeleton for client site?
    Like
    clientID
    - 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
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The skeleton above seems to be from plesk, it is not compatible with ISPConfig. ISPConfig uses its own folder scheme. If you want to use a plesk scheme, then you would have to change large parts of the ISPConfig server code.
     
  3. QuetzalFirst

    QuetzalFirst Member

    heuu.. what?? I can't define my own substruture ??? Can you tell me what are the different folders in webID and what are the philosophical choice about this scheme?
     
    Last edited: Mar 24, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Why shall this be configurable, just because you want to put the plesk or cpanel folder scheme on a ISPConfig server which then does not match ispconfig functionality and therefor will break sooner or later? ISPConfig has its own folder scheme, if you dont like ispconfg then you should stay with plesk as we have no intentions to clone plesk. We develop an improved multiserver controlpanel for hosters and not a plesk clone.

    Here are the path descriptions:

    log contains log files
    cgi-bin contains cgi scripts
    ssl contains the ssl certificates of the website
    web contains the website
    private contains private files that shall not be accessible by http
     
    Last edited: Mar 24, 2015
  5. QuetzalFirst

    QuetzalFirst Member

    Good Morning

    Sorry for my English ... I think I speak evil. The idea is not criticized ISPConfig. I find that your team are doing an incredible job. The idea is not to have something that looks like Plesk (I want to just get rid Plesk).

    What I want to know is why this structure.

    For example, if I create a subdomain (vhost) it has the same structure as the domain (which is perfect and logical). However, the folder that contains it, is at the same level as the "web" of the primary domain.

    How can I create or additional folders inside web? For example, I wish every site I've created a suitable .git directory.

    Anyway, the naming convention is matter of taste. So it's not really significant. But how can I program the creation of folder within "web" is important to me.

    Again, congratulations for the tremendous work that is done here.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    When a subdomain shall have its own folders, then you normally create a new website for it. This ensures that the subdomain is correctly isolated from all other domains and websites. The vhost subdomain function is just an option to share the same directory between a subdomain and its main domain, I dont use that on any server but some users wanted this, so we implemented this as an option and disabled it by default as its usage is not recommended for security reasons. The folder of this vhost subdomain is freely configurebale, as it is a addon of a site (and not a new site), its folder is inside the web directory.

    You can do that e.g. by writing a small plugin that is bound to the website insert event. ISPConfig is fully event driven, so you can hook your own actions to any server side event. The website root is protected with the immutable attribute as it is a security risk when a user would be able to add its own folders there (or remove folders like the web folder), so when you add a folder from within your plugin, you will have to unset the immutable bit fisrt, then create the folder and set it again afterwards. The function for this is:

    $app->system->web_folder_protection($data['new']['document_root'], false);


    and then call afterwards:

    $app->system->web_folder_protection($data['new']['document_root'], true);
     
  7. QuetzalFirst

    QuetzalFirst Member

    Thank you very much for help.
     
  8. QuetzalFirst

    QuetzalFirst Member

    Hi
    Where i can find doc to develop plugins?
    Thank you
     

Share This Page