PDA

View Full Version : client directory structure in ispconfig 3


MrM
28th March 2009, 18:51
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.

till
29th March 2009, 13:13
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.

MrM
29th March 2009, 17:19
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"?

till
29th March 2009, 17:25
Thanks for the answer, till. Is there any documentation for writing plugins?

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

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

All possible variables are alraedy used in the default path.

MrM
29th March 2009, 17:37
None except of the posts in the developer forum. As a start you just copy a plugin and change it to suit your needs.
OK, I'll take a look at the developers' forum then. Thanks.

All possible variables are alraedy used in the default path.
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.

till
29th March 2009, 17:50
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.

Please post feature request here:

http://bugtracker.ispconfig.org

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.

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.

MrM
29th March 2009, 18:08
Thanks for your quick replies, till!

Please post feature request here:

http://bugtracker.ispconfig.org
Will do that.

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.
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?

till
29th March 2009, 18:14
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?

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

MrM
29th March 2009, 18:23
Nno. it is not intended that the path is changed on a system were you created anything.

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?

till
29th March 2009, 18:28
There is no option to set the path by site in ispconfig 3. The setting fo the global path is in server settings.

MrM
29th March 2009, 18:36
There is no option to set the path by site in ispconfig 3. The setting fo the global path is in server settings.

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.

till
29th March 2009, 18:36
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.

till
29th March 2009, 18:42
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.

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.

MrM
29th March 2009, 18:44
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.

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).

MrM
29th March 2009, 18:56
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.

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:
/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.

till
29th March 2009, 19:00
You can set as many different sysmlinks as you like in the system settings. Take a look at the exsiting settings there.

MrM
29th March 2009, 19:13
You can set as many different sysmlinks as you like in the system settings. Take a look at the exsiting settings there.

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.

MrM
29th March 2009, 19:23
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).

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:

MrM
29th March 2009, 20:28
I have now submitted a feature request (http://bugtracker.ispconfig.org/index.php?do=details&task_id=674) and a bug report (http://bugtracker.ispconfig.org/index.php?do=details&task_id=675) 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.

falko
29th March 2009, 22:12
Also, great work on ISPConfig 3. It's a huge improvement over version 2. I will definitely upgrade.Please note that it's not possible to upgrade from ISPConfig 2 to ISPConfig 3.

MrM
29th March 2009, 22:16
Please note that it's not possible to upgrade from ISPConfig 2 to ISPConfig 3.

Indeed, a poor choice of words on my part. What I meant was reinstall. ;)

MrM
1st July 2009, 21:13
Hi, I would like to inquire if the feature request I submitted 3 months ago (FS#674 : Add more variables to the Website path (http://bugtracker.ispconfig.org/index.php?do=details&task_id=674)) is being considered, or has perhaps already been implemented in a new version.

What I would like to ultimately achieve, is to basically nowhere use/see IDs. This includes any directories, shell users/groups, database names, database users, ftp users, etc. I think using IDs in these places greatly reduces readability and coherence. Instead of IDs, custom (meaningful) names should be used.

At the moment, if I wish to browse a certain database in phpmyadmin for example, I first have to learn the ID of the site in question. Same goes for directories, users, etc.

So, I actually have two questions now:
1. Is my feature request being considered?
2. Is it possible to get rid of IDs as described above?

Thanks in advance!

till
1st July 2009, 23:40
You should take a closer look at your ispconfig. ISPConfig is createing symlinks with names everywere, so you can browser evry directory by name and not ID. Also clinet names can be used in database names instead ID's. But its not recommended as this can cause you a lot of problems when the client change its name and then parts of its websites stop if the database and mysql user gets renamed too.

MrM
1st July 2009, 23:57
Hi, till,

The one thing I really liked about cPanel (and not much else), was how it handled this particular issue. Upon creating a new site, you would assign a unique username to it, which would then be used everywhere: as the ssh/ftp login, database name and user prefix, directory name, shell user, etc. This makes for a very well organised and coherent system, easy to navigate through.

Would something like that not be possible with ispconfig as well? Assigning a unique (string) identifier to each client and website, to be used throughout the system?