Welcome to Centmin Mod Community
Register Now

PHP-FPM Multiple domains, php-fpm

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by tjk, Jun 18, 2016.

  1. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +27
    Local Time:
    4:18 PM
    Does Centmin Mod create a separate php-fpm instance with user perms for each vhost, for folks hosting multiple domains on 1 server?

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:18 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Nope out of box is one php-fpm pool with config files outlined at Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS

    Beta Branch - Centmin Mod .08 beta03+ Multiple PHP-FPM pools support added | Centmin Mod Community is a way of supporting multiple php-fpm pools with same nginx user/group just for load balanced upstream and/or individual usage in specific location contexts in nginx vhost so you can assign specific php-fpm pools for certain pages i.e. upload/attachments getting their own php-fpm pool and own timeout values - which is what i mainly use multiple php-fpm pools for i.e. admin areas, attachment areas, search areas via location context matches
     
  3. Jimmy

    Jimmy Well-Known Member

    1,778
    388
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +987
    Local Time:
    4:18 PM
    @eva2000 good to know. I just discovered the pools thread the other day and was trying to find some time to really understand it. So, it's better to assign the pools to something vs. just setting up the pools and leaving them for everyone to use.

    Would it be better to use a pool per site or would not having pools at all do the same thing?
     
  4. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +27
    Local Time:
    4:18 PM
    Right, hence my original question, it doesn't support multiple pools with different users, just same user and load balanced pools.

    Thanks!
     
  5. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +27
    Local Time:
    4:18 PM
    Pool per site doesn't give you the user isolation and security that it mainly would be used for, just load balanced pools for same user/all sites.
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    6:18 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    depends on your objectives.. i use specific php-fpm pools for attachment/uploads or admin so i can set their own specific timeout values longer than the main regular php-fpm pools via their own config files in /usr/local/nginx/conf/phpfpmd directory

    yup this is to just better manage php-fpm usage/load