Apache Directives questions

Discussion in 'Installation/Configuration' started by scottrill2, Mar 2, 2011.

  1. scottrill2

    scottrill2 Member

    Hello folks,

    A few questions in regard to apache directives. On my Ispconfig 2 server I used suPHP and had multiple php.ini files.

    For instance in the "administrator" folder of one of my sites I had a php.ini file allowing really large uploads in order for a joomla extension to work, but yet in my root folder I had a php.ini with more stringent settings for the public so they couldnt upload a monster file.

    In ISPConfig 3 I am using fast-cgi and I understand I can no longer use php.ini files. my question is how can I tell ISPConfig3 to apply this php setting to admin folder but yet this setting to root web folder etc?

    I tried using the directory syntax in the apache directives like so:

    <Directory "/var/www/clients/client2/web1/web/administrator/">
    loose php values here

    <Directory "/var/www/clients/client2/web1/web/">
    strict php values here

    But that doesnt work. Of course putting the commands in the "Custom php.ini settings" works, but then it applies the settings across the board.

    As always thoughts and suggestions appreciated folks,

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP.ini values are always set per vhost, the directory syntax is not supported by suphp.

    Thats wrong. the php.ini setting on the options tab works for php-cgi, suphp and php-fcgi as described in the manual.
  3. scottrill2

    scottrill2 Member

    Thanks for the reply Till

    In suphp I used individual php.ini files in admin folder etc etc. I am probably not conveying my thoughts clearly I do apologize. here is an example.

    On the Ispconfig 2 server with suphp I had for instance the following:

    In folder /var/www/web1/web/ - php.ini with settings like (upload_max_size = 5M & post_max_size = 10M)

    In folder /var/www/web1/web/administrator/ - php.ini with settings like (upload_max_size = 25M & post_max_size = 30M)

    I did the above so that family could upload photos etc but not try to upload like a whole home movie etc. But yet for some joomla extensions located in the administrator folder I would receive errors because some of the extensions needed larger upload allowances.

    Now that I am trying to switch to ISPConfig 3 with Fastcgi and suexec, I would like to have those same settings. Is that possible?

    Can the directory syntax be used with fastcgi? Or should I switch back to suphp so that I can go back to mukltiple php.i ni files in diff folders?

    Thanks as always,

    Scott Cottrill
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    php.ini settings are set per vhost and not per directory for php-fcgi.
  5. scottrill2

    scottrill2 Member

    Cool Deal Till,

    Thanks for the clarification. The only time I needed the larger upload allowances was when I was installing a big extension etc. I could always increase the upload size under custom php.ini settings and then set it back to normal after I am done installing module etc.

    Thank you as always,


Share This Page