nginx/proxy: php selector using wrong php on secondary domain is default domain swapped, 2nd not

Version 1.514

Bugfix
Finished

Conditions: 1 - Using either nginx, or nginx/proxy. 2 - using 2 php versions in the CustomBuild options.conf 3 - default domain php selections are changed. This causes nginx_php.conf to be swapped (for ~username php, as default domain controls it) 4 - Secondary domain php versions are NOT swapped, matching the CustomBuild options. Because of #4, DA didn't consider the secondary domains swapped, so it used the nginx_php.conf, which was incorrect. Fix was to take note for when the php_nginx.conf was swapped. If it was, always add secondary domain php code into the nginx.conf, so it's correct, no matter what's in the main file.

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