Per site php configuration with nginx

Discussion in 'Installation/Configuration' started by kaostc, Jan 19, 2023.

  1. kaostc

    kaostc Member

    I use nginx as web server. Need to change the max file size allowed for uploads.
    I have set the following parameters in options tab of site configuration:
    post_max_size = 256M
    upload_max_filesize = 256M
    max_execution_time = 600
    And it does not work.
    If I modify these settings in /etc/php/7.4/fpm/php.ini, it works.
    What am I missing
    Thanks a lot for your help.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you set the data in the right field? They must go into the custom php.ini field and not in the nginx directives.
     
    ahrasis likes this.
  3. kaostc

    kaostc Member

    Sure, since I have also some nginx directives in the other field. What writing in this box (php.ini) exacltly do? I guess it shoud create some php.ini file somewere, or something so...
    Thanks a lot.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    php-fpm does not use a custom php.ini file. The custom configuration is written to the php-fpm pool config file, so you can find your custom config there. Maybe there was an issue restarting the php-fpm pool so that changes could not be applied automatically.
     
    ahrasis likes this.
  5. kaostc

    kaostc Member

    Solved. I had modified fastcgipass value in nginx configuration box in a way that the site was not linked to the specific pool.d file anymore. Now I have set the correct fastcgipass configuration and everything works like a charm.
     
    ahrasis and till like this.

Share This Page