Howto Create Multiple Symlinks by Default

Discussion in 'Tips/Tricks/Mods' started by billcouper81, Mar 17, 2010.

  1. billcouper81

    billcouper81 New Member

    I have searched this forum and google but I can't find anything on this...

    When making a new "site" ISPConfig will automatically create a sym-link in /var/www/domainname.com

    I am using roundcube webmail and it is located in /var/www/roundcube
    How am I to get ISPConfig to automatically create a symlink in the client web folder?
    /var/www/domainname.com/web/webmail -> /var/www/roundcube

    Normally I just ssh to server and create the link manually, which is OK if I am doing the setup of a new website, but if another of staff is doing they will always forget or skip this step.. can i make it auto?

    I tried adding extra to the "Website Symlinks" in server config, and seperated them with , or ; but it just breaks it completely (not even the normal one gets made so I set it back to default setting)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can e.g. write a plugin for this and bind it to the same events then the apache plugin. Take a look at the apache plugin for details and there are also some threads in the dev forum on how to write plugins.

    We do not offer such a function in ispconfig as it does not work reliably. It breaks when you use high security settings or suphp or php-fcgi as it is done on hosting systems.

    This field is only for symlinks pointing to the website and not for syminks in the website.
     
  3. billcouper81

    billcouper81 New Member

    i have no clue about apache plugins

    can i suggest to implement such a feature, in the distant future? to be able to comma seperate multiple symlink directives in the "Website Symlinks" field?

    this could help noob sys admin like myself, i am still learning linux and have a loooong way to go (if there is such thing as a finish line)
     
  4. dclardy

    dclardy New Member

    If you are adding it for every site, why not put a just create an alias in apache.

    Code:
    vi /etc/apache2/conf.d/apache2-doc
    Code:
    Alias /webmail /var/www/roundcube/
    
    <Directory "/var/www/roundcube/">
    Options Indexes FollowSymlinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddDefaultCharset off
    </Directory>
    Then just restart apache, and all your sites will automatically end up at that when they go to domain.com/webmail
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    As I explained above, this field is for something completely different.
     
  6. billcouper81

    billcouper81 New Member

    thanks dclardy
    i tried your suggestion and indeed it does work as intended.. now i don't need to make sym links in each sites web folder.. thankyou


    thanks till
    sorry i didn't realise, i am a big nooby
     

Share This Page