Allow Custom Nginx Configurations for the Lightning Stack
As there are some Wordpress plugins, which require that Nginx rules be implemented in order for the plugin to function properly, it will be really useful to be able to add custom server configurations for Nginx when using the new Lightning stack.
In cases such as the above, currently, the only option is to use the hybrid Apache/Nginx stack and utilize .htaccess for custom server directives. This, however, prohibits the applications from using the new pure Nginx Lightning stack, which provides better server response times.
Please give due consideration to this important feature, as the stack matures and more functionality is added around it.
Thank you!
-
WOOM commented
I second this. The following is the explaination we got from Cloudways when asked to include additional script to "location" block on Lightning stack:
"Based on our current platform security policies and as seen in similar cases, direct changes to FPM pool socket permissions or custom nginx location blocks for individual PHP scripts are restricted for security reasons. These types of changes are typically not supported on the Lightning stack, as they can introduce risks to server stability and security.
If you don’t want to set up a cron job using /usr/bin/php but still wish to clear the OPCache on demand after deployment, you can simply run the following command once the deployment is complete:
/usr/bin/php /path/to/opcache_reset.php"Explanations about "risk" and "stability" are invalid - real-world apps need more flexibility than what is currently allowed in Lightning stack. Restricting all changes to nginx config is declaring failure in supporting your users applications that are not strictly click-to-install ones.