Learn about Centmin Mod LEMP Stack today
Register Now

Nginx What is the difference between these different Nginx FastCGI conf files?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by jeffwidman, May 19, 2015.

  1. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    6:34 PM
    I'm a bit confused--I see the following that all appear to have similar fastcgi config values:
    • fastcgi.conf
    • fastcgi_params.conf
    • php.conf # appears to take the above, wraps it in a location block, and adds a TCP or Unix port
    Looks like fastcgi.conf and fastcgi_params are basically dupes due to legacy reasons, with fastcgi.conf being the improved version of fastcgi_params.

    If php.conf just takes these values and wraps them, why not write php.conf so it includes fastcgi.conf and adds on whatever custom vars are needed?

    Also, why does php.conf have the GeoIP vars but phpalt.conf doesn't?

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:34 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah it's legacy reasons as well as for reference as to the nginx default files/settings versus what Centmin Mod is setup with via php.conf.
    just makes it easier for Centmin Mod to automate and maintain the one php.conf file as opposed to more files to keep track of. As to phpalt.conf, I left it out as it's an alternative method of using php.conf but I haven't done any automated code/account for it for GeoIP (i.e. when you disable Nginx GeoIP support in centmin.sh, it auto disables any GeoIP setting in php.conf right now - but doesn't account for phpalt.conf).

    phpalt.conf is discussed at PHP-FPM - Connecting nginx to PHP FPM | Centmin Mod Community just as a way for folks to test other configurations for php-fpm setup.