client directory structure in ispconfig 3

Discussion in 'Installation/Configuration' started by MrM, Mar 28, 2009.

  1. MrM

    MrM New Member

    Hi,

    We are currently using ispconfig 2 for our production web server and are quite pleased with it, aside from some minor annoyances. One of these is the directory, user and db naming. Having many sites hosted on the server, it can get next to impossible to find the directory, database or user of a particular site, when they are named web1, web2, db1, db2, etc.

    I have been testing ispconfig 3.0.0.9 a while now (from the downloadable debian vmware image), and must say I am very impressed with it. It seems that the naming issue has been somewhat addressed in ispconfig 3, too. The databases can now be named arbitrarily, with a prefix (I changed the prefix to [CLIENTNAME] and it seems to work). There is now also an option to define a custom directory structure in Server Config > Web. For lack of documentation though, I don't know how to set it to what I would like to achieve.

    Here is what I would like to have:
    - linux (shell) users equal to the domain name (i.e. 'domain.tld')
    - linux (shell) groups equal to the client's ispconfig username
    - the client directory structure equal to something like this: /var/clients/[username]/[website_domain]

    Is this possible with ispconfig 3? If so, this would be a major incentive for us to upgrade to version 3, even though we would have to reinstall the OS from scratch.
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    This is not implemented in ISPConfig 3, but you may write new plugins for the ispconfig server part to implement this as ISPConfig 3 is very modular and you can replace all configuration paers with your custom plugins easily.
     
  3. MrM

    MrM New Member

    Thanks for the answer, till. Is there any documentation for writing plugins?

    How much path customization is possible without a plugin? Which variables can be used instead of [client_id] in the "Website path"?
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    None except of the posts in the developer forum. As a start you just copy a plugin and change it to suit your needs.

    All possible variables are alraedy used in the default path.
     
  5. MrM

    MrM New Member

    OK, I'll take a look at the developers' forum then. Thanks.

    Would it be possible to make a feature request for more variables (e.g. all fields from the client and web_domain tables)? This should be extremely easy to implement, since variable replacing is already there. ;)

    One more note: I've tried changing the Documentroot, Linux User and Linux Group in Web Domain Options, but this feature doesn't seem to work. After I click save and edit it again, the values revert to default. Although the directories in /var/clients get created, the symlinks still point to the old location.
     
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Please post feature request here:

    http://bugtracker.ispconfig.org

    This works fine for me, but you will have to move all existing directories and to the new place too and change all symlinks to the new locations.
     
  7. MrM

    MrM New Member

    Thanks for your quick replies, till!

    Will do that.

    When I change these settings, they do not change in the database (table web_domain), however new directories get created. It seems that the system-wide default path takes precedence. If I change that, all my sites' paths get updated as well.

    Also, shouldn't symlinks be updated automatically?
     
  8. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Nno. it is not intended that the path is changed on a system were you created anything.
     
  9. MrM

    MrM New Member

    OK, I can understand that. The problem is, that when adding a new site, the site gets created when I click Options. At that stage, as you pointed out, it is already impossible to change the path, since the site already exists and the directories have already been created. This means that these settings can't be changed ever, if they cannot be changed while creating a new site. Am I missing something?
     
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    There is no option to set the path by site in ispconfig 3. The setting fo the global path is in server settings.
     
  11. MrM

    MrM New Member

    If you go to Sites, click on a site, then go to Options, there is an option to change this. It just doesn't seem to work. ;)

    If I can somehow change the default path to something more readable (via a plugin or a new feature), I won't be needing this anyway. So, I'll look into that, first. Thanks for all your help, till.
     
  12. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Just one thought. Maybe you use and outdated prerelaese of ispconfig 3, there was a path field in some of the developer versions to make the development of apache plugin easier which has been removed. You should update your installation to the current stable release.
     
  13. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    ISPConfig uses symlinks for that. Using symlinks is much better in my opinion then using the names in the paths, so you dont have to change the path in all your php scripts if the name of xyz cahnges and the symlinks provide perfect names on the shell to navigate easily.
     
  14. MrM

    MrM New Member

    That's probably it! As I mentioned in my first post, I use the vmware image ISPConfig_3.0.0.9_rc2_debian_lenny for my testing. I'll update to the final release (wasn't aware there was one already).
     
  15. MrM

    MrM New Member

    Yes, but the symlinks are only created in the /var/www directory for each site (please note that I am still refering to 3.0.0.9; this could have been changed in 3.0.1). It would be nice to have the /clients directory nicely organised too. Something like this:
    Code:
    /var/clients/
        first_client_name/
            website1.tld/
            website2.tld/
        second_client_name/
            website3.tld/
    In addition, it would also be nice to have the linux user and group configurable, so more meaningful names can be specified.

    I'll post a feature request for both of these issues.
     
    Last edited: Mar 29, 2009
  16. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You can set as many different sysmlinks as you like in the system settings. Take a look at the exsiting settings there.
     
  17. MrM

    MrM New Member

    As far as I can see, you can only create symlinks pointing to the website directories, and not to the client directories, so the above directory structure is not possible. Again, I am referring to 3.0.0.9, not 3.0.1.
     
  18. MrM

    MrM New Member

    I have now upgraded to 3.0.1 and the website path can indeed no longer be configured per site. However, the linux user and group options are still there, but they still don't seem to work. :confused:
     
  19. MrM

    MrM New Member

    I have now submitted a feature request and a bug report for these two issues. The issue with the linux user and group is explained in more detail there.

    Thanks again, till, for all your extremely quick responses. I never got so low response times with cPanel, despite paying for support. :D

    Also, great work on ISPConfig 3. It's a huge improvement over version 2. I will definitely upgrade.
     
  20. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please note that it's not possible to upgrade from ISPConfig 2 to ISPConfig 3.
     

Share This Page