• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Having Apache & NGINX, FastCGI & FPM

Mihail Llaftiu

New Pleskian
Hello,

i would like to ask what would be better for my server. Wanting to help more this thread and everyone who wants to make something similar, my server is going to host clients websites, their mails, databases storing tables from CMS(s) or from other web-apps. Until now, using plesk 12.5, i have already installed both Apache and NGINX (think so). This is displaying as a selection on "Plesk Updates & Installation(s)" or/and "PHP Settings" when you can chose between "FastCGI serving by Apache" or "FPM serving by NGINX".

So my question is:
  1. ..what would be better for use and why?
  2. ..Or is any way i can use, looking by other servers, "FastCGI serving by NGINX"? (and how is that possible
  3. Will any change, on apache/nginx or fastcgi/fpm, have any issue on websites that are already installed by changing the mode?
Thank you in advance, looking forward for some help and/or opinion(s)!
 
The perfect setting in terms of speed is "Nginx only hosting" (however only available on Onyx, not 12.5) and PHP-FPM through Nginx.

Generally, PHP-FPM is better than FastCGI, because FPM can combine several PHP processes in a single process instance, therefor saving resources and leading to faster executiong of code for the FPM instance resides in RAM after a script was processed for a certain time (typically 10 seconds), and when a second or third request comes in, these can be processed by the same instance - saving the overhead of loading and unloading processes.

On Plesk 12.5 I'd choose Apache + Nginx reverse proxy + PHP-FPM through Apache.

Processing PHP through Nginx / Nginx-only-hosting requires to convert existing .htaccess rules into Nginx rules, because .htaccess will be ignored. For most users this will be a big burden. They will expect .htaccess to work.

Toggling PHP modes between FastCGI and FPM normally will not cause issues to existing websites. Switching from FastCGI to PHP will normally speed things up a bit and reduce server load. Changing PHP versions could cause issues, because newer PHP versions do not include all functions of previous versions.
 
Hello @Peter Debik,

thank you for all those details . I read carefully all those informations and seems to be really interesting by the way you described it. I would like to learn more about the server settings, configurations and the way they work or should work for better deliverability and functionality. The way you explained it to me, about the selection of PHP and the way it can delivered, it's all clear to me now and acceptable. Thank you in advance.


I would also like to ask, if I'm not bothering:
  1. ..how may I know if I have "Apache + Nginx reverse proxy" or something else, now?
  2. ..And if can I use in setuped websites on server, FastCGI delivering through Apache... and for the future websites FPM delivered by NGINX?
  3. ..Would something like that be possible and/or good choice for functionality and deliverability of websites-apps by my server?
 
1.) In your Plesk version you always have Nginx as a reverse proxy and Apache as a backend server. This cannot be changed in 12.5.30.
2.) Yes, you can set the PHP configuration individually for each website.
3.) I don't understand the question.
 
Dear @Peter Debik

..Would something like that be possible and/or good choice for functionality and deliverability of websites-apps by my server?
My question is, "FastCGI delivering through Apache... and for the future websites FPM delivered by NGINX" combined be a wise choise for server, for a better performance and speed? ...or it will be better if i could setup also the old websites and web-apps on FPM through NGINX? I 'm asking this because i 'm afraid that i have to convert every htacces, as you previously mentioned, on each website i 'm hosting, until now!
 
You only need to convert .htaccess to Nginx commands if you are using Nginx-only hosting. You have version 12.5, so you are not using Nginx-only hosting, so you won't need to convert .htaccess.
 
Dear @Peter Debik , sorry for my englilsh grammar.

My question was
,
  1. ...is recommended or wise to use for older websites that i 've already hosted in my server FastCGI delivering through Apache and for the future websites and web-apps FPM delivering through NGINX?
  2. ...In case that i follow this methodology (that i described in 1.), will it be a big mess on server's performance or it will slow websites-apps speed?

Thank you in advance sir, for all your help!
 
Last edited:
Back
Top