• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Where to modify Nginx fastcgi settings

Xavier12

Regular Pleskian
Hey guys,

Hope you're well. I am trying to figure out what exact file to modify in order to optimize fastcgi settings, then to set default for all websites.

Sample code below, please advise. Thnx! :)


# execute all .php files via php-fpm
location ~ .php$ {
# connect to a unix domain-socket:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;

fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;

# This file is present on Debian systems..
include fastcgi_params;
}
 
Hi Xavier12,

you can create custom configuration files, by copying and editing the depending files from "/usr/local/psa/admin/conf/templates/default/" to "/usr/local/psa/admin/conf/templates/custom/". Be sure that you only copy these files, which you are going to edit, in order to still receive updates/upgrades/patches provided by Parallels.

After copying and editing the needed files, make sure to run:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
or
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain YOURDOMAIN.COM

... in order to force Plesk to reconfigure your configuration files and don't forget to restart apache and nginx afterwards.
 
Hi Ufhh01,

Thanks for the follow-up. Sounds great, copied the files over. Only question is, which file is the one required to be edited with the previous provided code. The section where fastcgi edited?

Please advise, thnx!
 
öhm.... stop, please Xavier12... please DON'T copy all files from the default folder to the custom folder, because Plesk will only update/upgrade/patch files in your DEFAULT folder and never will touch files in your custom template folder. Please copy and edit only these files, which really need to be edited!

You could as well add/modify your global nginx - configuration ( located at /etc/nginx/ ) , if you are unsure about the modifications for custom templates. If you have a closer look at the files, you will see, that "fastcgi_params" already contains some global definitions, which you could modify.

For the buffer etc... please have a look at the KB - article:

... where you already have some provided solutions.
 
Hi Ufhh01,

Already did copy it :( No worries.. I just left it there, not sure what to delete at this point a part from the files that were there already, unless I should delete it all in the custom template.

As far as the fastcgi options, copied them successfully to nginx.conf, saved, reconfigured all and everything is working fine
 
Back
Top