Documentation

How can I customize the NGINX/PHP FPM configuration?

Last Updated: March 13, 2024 7:23 PM

Legacy Wordpress Images

If you ssh or sftp to the website environment, you will find the folders. If the required folder does not exist, you can create it.

/usr/src/app/nginx /usr/src/app/php

Custom Nginx Config

To add a custom NGINX config for your website create a file in the nginx directory ending in .conf, and add your content to it.

/usr/src/app/nginx/mycustomconfig.conf

A faulty nginx config can prevent access to your website. To validate your config after making changes run the following command:

sudo nginx -t

In order for your changes to take effect the service must be restarted. To do so, run the following command:

sudo supervisorctl restart nginx

Custom PHP-FPM Config

Within the custom PHP-FPM config folder, you will find the following file into which you should add your desired changes. If no such file exists, please contact support.

/usr/src/app/conf/php/custom-php-fpm.conf

A faulty php-fpm config can prevent or disrupt access to your website. To validate your config after making changes run the following command:

sudo php-fpm -t

In order for your changes to take effect the service must be restarted. To do so, run the following command:

sudo supervisorctl restart php-fpm