Join the community 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

    Dec 3, 2014
    Local Time:
    10:50 AM
    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

    May 24, 2014
    Brisbane, Australia
    Local Time:
    3:50 AM
    Nginx 1.25.x
    MariaDB 10.x
    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, 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.