Accessing files outside of /web/

Discussion in 'Installation/Configuration' started by olimortimer, Jan 24, 2012.

  1. olimortimer

    olimortimer Member

    Apologies if this is a simple thing to do, but I've been searching around and can't find and answer (or in the Manual).

    I'm developing an application in Codeigniter, and want to be able to share the applications and system folder amongst different domains.

    To do this, firstly I want to put the directories up one level to the /web directory, but it doesn't seem to let me access it through PHP then.

    Is there a permission change I need to make somewhere, and how do this on 1 domain and multi domains?

    Many thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not access files outside of the web directory as thats outside of the apache vhost. But what you can do is e.g. using symlinks inside the web directory or apache aliases to point to directories outside of the web dir. You should be aware that this can make your system insecure and its not recommended. Beside that, if you share folders between websites you will have to use mod_php instead of the recommended php-fcgi with suexec. mod_php is not as secure as well.
     
  3. olimortimer

    olimortimer Member

    Thanks Till.

    Bit confused though, as isn't it supposed to be more secure by having config files etc outside of the browsable web directory?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats something different then what you asked above, your origial question was about "share the applications and system folder amongst different domains". You can have config files outside of the web directory by modifying the open_basedir path so that php can open / include them. But sharing files and folders between webs or making php scripts outside of the web dir to be callable by a url is insecure.
     
  5. olimortimer

    olimortimer Member

    Sorry, think there's a bit of confusion - I'm not wanting to have scripts outside the web dir accessible from a URL, just accessible by scripts inside the web directory.

    For example, each client has an index page in their web directory, which loads the correct config file (and app / system files) from outside their web directory. This would allow me to update one set of app / system files in the event of bug fixes etc;

    /cms/application
    --/client1-config.php
    --/client2-config.php
    /cms/system
    -- /systemfiles.php

    /client1/web
    --/index.php
    /client2/web
    --/index.php

    Where would I update the open_basedir path for each client? I'm guessing in their own php.ini file? Where would I find the client specific php.ini?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    options tab of website settings.

    options tab of website settings.
     
  7. olimortimer

    olimortimer Member

    Brilliant, thank you. Sorry for the "noob" questions.
     

Share This Page