Nginx to have included nginx_php.conf to fix proected directories (TEMPLATES)

Version 1.46

Bugfix
Finished

Because of the way nginx does it's location matches, any protected directories needed to have all php functionality appear again within that protected location. This got infinitely messy to try and manage with the old template layout, so we killed two birds with one stone by introducing: /usr/local/directadmin/data/users/username/nginx_php.conf Anywhere the php setup was needed in the user nginx.conf (which was many places), that php setup has simply been replaced with: |NGINX_PHP_CONF| which adds this code into it: include /usr/local/directadmin/data/users/username/nginx_php.conf; but in the event the php selector is swapping the php versions (which is a on per-domain basis), DA will fill the NGINX_PHP_CONF with the actual nginx code, rather than the include. The included file is on a per-DA-User basis, hence wouldn't work for the php selector. New template: /usr/local/directadmin/data/templates/nginx_php.conf as usual, you can copy it to: /usr/local/directadmin/data/templates/custom/nginx_php.conf if you need to make changes. The Admin Level -> Custom Httpd Config area does not have effect on the tokens in the nginx_php.conf. They're loaded fresh.. however, there are not really any interesting tokens in that file anyway.. mainly just HAVE_PHP1_FPM and USER, so unless anyone has any urgent need for custom editing of this on a per-User basis, for now customizations will be via template only. (not to mention it's a per-User file, not a per-domain file) Changes have been made to essentially all nginx_*.conf templates, in terms of using the "include" line, mentioned above.

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