• 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 Custom nginx.conf by plan

Émerson Felinto

Regular Pleskian
Can I create different nginx.conf for each plan?
The purpose is to charge my customers different prices according to the number of simultaneous connections.
Plan 1 could support up to 50 connections.
Plan 2 could support up to 100 connections.
Can this be done in Plesk using the Nginx engine (Nginx only)?
 
In the "nginx directives" of your Service plan you could configure specific options for your purpose, but I'm afraid that ngx_http_limit_conn module is required. By default Plesk version of nginx doesn't support it,
 
Thanks, but I've tried compiling nginx before and failed miserably.
There were several mistakes and it made me give up right away.
Maybe when I learn more about it I'll do it myself or hire someone to do it for me.

An alternative, not following that line exactly would be the limitation of RAM and CPU, although it is somewhat less intuitive for the client and the fact that Plesk does not provide graphics showing usage for my clients is a problem. But it could work.
 
Thanks, but I've tried compiling nginx before and failed miserably.
There were several mistakes and it made me give up right away.
Maybe when I learn more about it I'll do it myself or hire someone to do it for me.

An alternative, not following that line exactly would be the limitation of RAM and CPU, although it is somewhat less intuitive for the client and the fact that Plesk does not provide graphics showing usage for my clients is a problem. But it could work.
hello again Émerson Felinto,
mmm, maybe the "Plesk Cgroups Manager" module will help you in a way. If you can calculate how many resources consumed each request you could limit the number of requests based on the resources you set up for each subscription.

 
Back
Top