Agent 2.0.7 Changelog
2.0.7 Agent introduce a new php-fpm configuration. We have many customers using WordFence for WordPress but the problem is, you need to include php file inside php-fpm config. You can’t just simply update the fpm config file to achieve this. So, the latest agent will fix that for you.
If you have installed RunCloud before this blog post was created, you need to rebuild your Web Application just by clicking the rebuild button. Then you can SSH into your server and you will find a new file inside /etc/php-extra/<web_app_name>.conf. This is where you can include your WordFence config or other configuration that you need to modify that isn’t supported inside RunCloud Panel.
Example of configuration you can add there is:
php_admin_value[auto_prepend_file] = /path/to/web-app/wordfence-waf.php
After you have added that, just reload your php-fpm daemon. If you are using php7.1, run:
systemctl reload php71rc-fpm
If you are changing your php version to php7.0, 5.6 or 5.5, this config will still be used by the new php that you have selected without manually reloading them. Nifty right?
You are now able to choose your Web Application stack. There are two stack to choose.
- NGINX + Apache Hybrid
- Native NGINX
NGINX + Apache2 Hybrid Stack
This stack is good if you are using .htaccess. Everybody knows that .htaccess is slow, but we can’t run from it because most PHP Scripts use .htaccess for their rewrite and logic. Different from most setup, this stack does not fully proxying Apache2. It is called hybrid because NGINX and Apache2 does their own job.
NGINX is good at serving static files such as css,js,image and icon. And it is better at serving static files than Apache2. By using this stack, your static files will be served by NGINX and dynamic files will be served by Apache2 + FPM.
Native NGINX Stack
Why would anyone choose Native NGINX instead of the hybrid? Basically because it is faster and doesn’t need Apache2 at the backend of the NGINX. By using this stack, NGINX talks to fpm directly using FastCGI. By choosing this stack, you are agreed that you won’t be able to use .htaccess. You can control the logic of this stack by extending NGINX config. This is the choice for most developer because it is faster and most of us hate .htaccess.