• 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 plesk as reverse proxy?

yotsuba3

New Pleskian
Question! I run plesk on digitalocean, bare centos 8.3 then plesk installed on top. I came from serverpilot/ubuntu where serverpilot claims that the very best way to run php is
nginx as a reverse proxy, so apache takes care of dynamic stuff, and nginx takes care of static stuff. Here is the exact serverpilot article How ServerPilot Configures Your LAMP/LEMP Stack - ServerPilot
So, i have some sites hosted, php 8. In plesk, under hosting options, i chose the bottom one, "PHP-FPM served with nginx". Im wondering, is that similar to the serverpilot way of using nginx as a reverse proxy? Or should i set it to the one above it, php-fpm served by apache?? Thank you so much in advance for answering.
 
When you choose PHP-FPM served by Nginx, basically all is served by Nginx. In that case you could disable "proxy mode" in the Apache/Nginx settings, so that Nginx is the only web server active. It is the fastest possible web page delivery and PHP code execution. You can use Nginx caching to speed it up a bit more if your website is suitable for caching.

However, the downside is that you cannot use typical Apache modules and .htaccess rewrite and access rules. You need to translate these to nginx syntax and insert them as additional Nginx directives in the Apache/Nginx settings.
 
When you choose PHP-FPM served by Nginx, basically all is served by Nginx. In that case you could disable "proxy mode" in the Apache/Nginx settings,
Well im trying to have the reverse proxy, but there does not seem any plesk options to have it! Seriously, what does PLESK expect, that people manually config the nginx files by hand? Maybe i was not clear enough. Like, if it only says php-fpm on bottom, or above it it shows apache, how do i set it so nginx handles static and apache handles dynamic content? Shouldn't plesk have a setting to set it to that?

Like, serverpilot.io explains it here, (pls look at article, its worth it) How ServerPilot Configures Your LAMP/LEMP Stack - ServerPilot they say its configured real good on both the nginx config side AND the apache side, then they also say its configured real good for security. I really like them and the way they set up the server, I was trying to get close to being able to do that myself, without having to use serveriilot tho. So i got a digital ocean server of bare centos 8, put PLESK on it, and it is really decent and secure (with the exception that red hat killed centos so dec 2021 no more centos).

Plesk is nice, it could drastically be better for newer users if it just ran nginx for static files and apache for dynamic content. Looking at the list of plesk options, sure, there is run php as apache or the better run php as nginx but shouldnt there be an option to have it be the reverse proxy like serverpilot has? So in order to achieve a reverse proxy, what does PLESK expect, that people manually config the nginx files by hand? If that is the case one might as well run everything from the command line, (which is easy of ubuntu but centos is more secure overall)
 
Last edited:
To use Nginx as a reverse proxy, check the "Nginx" > "Proxy mode" checkbox on the "Apache & Nginx Settings" page on the "Websites & Domains" menu.
 
To use Nginx as a reverse proxy, check the "Nginx" > "Proxy mode" checkbox on the "Apache & Nginx Settings" page on the "Websites & Domains" menu.
Thanks, i will try it! So that will serve static files on nginx and then dynamic php content can be handled by apache?
 
Back
Top