Layout of new users's folders.

Discussion in 'Developers' Forum' started by Spum, Oct 25, 2005.

  1. Spum

    Spum New Member

    What's the current layout?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The current layout is, assumed we have the website with ID 1 and the domain www.mydomain.com and all webs are located uder /var/www:

    /var/www/web1/
    Symlink: /var/www/www.mydomain.com => /var/www/web1/

    The Symlink is created for easier navigation on the shell.
    Inside the directory of the web we have the following folders:

    logs/ Contains the logs of this website
    user/ Contains the user directories
    web/ contains the website data (HTML files)
    cgi-bin/ CGI-Bin Directory
    ssl/ SSL Certificates of this website
    phptmp/ Temp directory if PHPSafemode is enabled

    Inside the User directory are the homedirs of the users located, assumed we have a user named web1_admin:

    /var/www/web1/user/web1_admin/

    Inside the userdirectory:

    Maildir/
    Maildir/cur/
    Maildir/new/
    Maildir/tmp/
    web/ In this web directory the user can put his personal homepage. The files can be accessed by www.mydomain.com/~web1_admin/

    I'am not sure if we really need this userweb feature in new releases.
     
  3. Spum

    Spum New Member

    wouldn't it be easier to do something like this;

    >usr/user_name/
    ->usr/user_name/bin <-- for binary applications to run from (for those who want to offer, say IRCd hosting)
    ->usr/user_name/domain.com
    -->usr/user_name/sub.domain.com
    ---> usr/user_name/domain.com/mail
    ---> usr/user_name/domain.com/web <-- base level of domain
    ---> usr/user_name/domain.com/ftp
    ---> usr/user_name/domain.com/log
    ---> usr/user_name/domain.com/ssl
    ---> usr/user_name/domain.com/cgi-bin
     
    Last edited: Oct 25, 2005
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    With user_name you mean the name of the client? Clients currently have no linux system users, but in a virtual setup where mailusers and ftpusers arent systemusers anymore we can change this.
     
  5. Spum

    Spum New Member

    I mean the user name you specify the client, or the client's name as a system user.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, this makes sense. Then the client will have one FTP account (or more when they are virtual) for all his domains.

    It will be nice if this user can be chrooted with an patched SSH then it will be possible to assign SSH accounts without opening the complete server.
     
  7. Spum

    Spum New Member

    Yeah, that would be a good idea, actually. But yeah, i'm pretty surte the layout i suggested would be better.

    I can implement it in whatever to allow the user to specify which way user accounts should be made, /home/ or /usr/, or they can specify the location if they wish :D The great idea with this layout is that the folders can be made per user feature, so say a user only has FTP access and web to his or her domain, then that is the only folders they get!
     
  8. SleeperZ

    SleeperZ New Member

    Can I make a sugestion?

    I see the folder layout / domains as a single issue which shouldn't be too hard to solve.

    /home/user_name/folder

    Now the domains are under a different tab and you can link domains to that folder (symbollic links) quick note: I would not put these in the same directory / file system eg: /home/user_name/website.tld -> /home/user_name/folder.

    A nice way for this to work imo would be for a seperate folder to have all the symbollic links. I use /etc/httpd/vhlinks/ which maps the web address to a folder.

    This brings me to the virtual hosts. I think a good feature would be to use mod_vhost_alias in apache. By using virtualhost "Templates" you would reduce your memory footprint, and also remove the need to restart the webserver every time you add a domain.

    I am planning on implimenting mod_vhost_alias for my own network, and am happy to submit this code back, would be interested in hearing some feedback on what everyone thinks about what i've described there.

    Cheers.
     
  9. Tribal-Dolphin

    Tribal-Dolphin New Member

    Hy all,

    It seems good but what about the compatibility with current ISPconfig layout?

    For users how have partitionned with a big /var partition, they have to rebuild all the server don't they?

    Maybe you have a migration script for realise this easily.
     
  10. SleeperZ

    SleeperZ New Member

    Hi Tribal,

    I dont think anyone was planning on changing the actual partition you want to use. This will still be settable in the config files. But from there on in it will be based on that structure.

    I do not think its a good idea to continually change this structure, that is why I believe the most flexible method should be frozen and not altered too much in future releases. I think this code should be backwards compatible somehow with the current setup, as PHP websites often have paths set etc and changing structures around would totally mess with this.
     
  11. Tribal-Dolphin

    Tribal-Dolphin New Member

    Happy to read that !!
    I am reassured :)
     

Share This Page