Ability to always load all php-fpm settings into User nginx.conf: nginx_fpm_always_set=1

Version 1.52


New directadmin.conf option: nginx_fpm_always_set=0 where 0 is the internal default, which can be set to 1: nginx_fpm_always_set=1 and restart DA, to prevent the server{} entries from using: include /usr/local/directadmin/data/users/username/nginx_php.conf; and instead force the loading of the php-fpm settings right inside the nginx.conf for each domain. This is already done in cases where Users have swapped php versions but this adds the option to do it all the time for other scenarios where you might need control tokens from the nginx_php.conf on a per-domain basis. The nginx_php.conf is a per-User file, thus times where php is not swapped, but you need per-domain control, set this option to 1. ===== TOKENS A change to how tokens are given to the php-fpm.conf template in per-domain mode (php versions swappped or nginx_fpm_always_set=1) in that the previous tokens, although loaded in, where not sub-sorted. For example, if you set: |?USER=fred| in the |CUSTOM| token at Custom Httpd Config -> domain.com, the CUSTOM token is available to it, but the php-fpm.conf doesn't have it set anywhere, so the sub-tokenization never happened. I've added a pre-tokenizer on all values to set: USER=fred for all tokens given to the php-fpm.conf Note, a new token container is created for the php-fpm.conf template, so if you set something right inside the php-fpm.conf, it will not carry up and on to other templates for the domain (eg: nginx_server_sub.conf), but the CUSTOM tokens set in the GUI will, as they always have. This was done to isolate these changes, as we don't want the sub-tokenization to happen too soon, as the order of tokens (eg: CUSTOM) is important, if a value is set there, vs CUSTOM1 before it.. the (eg: the USER should only be set once |CUSTOM| is called, so fred shouldn't be set until that point)

Interested to try DirectAdmin? Get a 30-day Free Trial!