Join the community today
Register Now

Nginx fastcgi_param HTTP_AUTHORIZATION $http_authorization;

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Itworx4me, Dec 23, 2025.

  1. Itworx4me

    Itworx4me Premium Member Premium Member

    343
    35
    28
    Mar 14, 2017
    Ratings:
    +65
    Local Time:
    2:09 AM
    Nginx 1.27.4
    MariaDB 10.6.21
    I need to add this (fastcgi_param HTTP_AUTHORIZATION $http_authorization) in order for OAuth2 to work. Where do I place this? AI says to place it here: /usr/local/nginx/conf/php.conf. Just want to make sure before I go doing something I haven't done in the past.


    Thanks,
    Itworx4me
     
  2. eva2000

    eva2000 Administrator Staff Member

    59,121
    12,506
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,138
    Local Time:
    7:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    For custom web apps, best to make a copy of /usr/local/nginx/conf/php.conf i.e. /usr/local/nginx/conf/php-myapp-name.conf
    Code (Text):
    cp -a /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-myapp-name.conf
    

    Then in Nginx vhost change include file reference from
    Code (Text):
    include /usr/local/nginx/conf/php.conf;
    

    to
    Code (Text):
    include /usr/local/nginx/conf/php-myapp-name.conf;
    

    then modify /usr/local/nginx/conf/php-myapp-name.conf as needed and then restart nginx and php-fpm
    Code (Text):
    systemctl restart nginx php-fpm
    

    or Centmin Mod command shortcut
    Code (Text):
    nprestart