Welcome! Log In Create A New Profile

Advanced

RE: How to set vhost-specific ENV vars for pass to php-fpm/fastcgi?

Reinis Rozitis
November 29, 2018 02:04AM
> In this case the ENV var "VHOST1_TOKEN" is corrrectly defined in the match case, but it is also *defined*, though null, for any/all other vhosts.
>
> How do I construct this conditional ENV var setting to ONLY set/defined the vars on host match?

You can add if_not_empty at the end of the particular fastcgi_param directive:

fastcgi_param VHOST1_TOKEN $this_token if_not_empty;

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_param

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to set vhost-specific ENV vars for pass to php-fpm/fastcgi?

pgndev November 28, 2018 06:36PM

RE: How to set vhost-specific ENV vars for pass to php-fpm/fastcgi?

Reinis Rozitis November 29, 2018 02:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready