• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Issue Overwriting core nginx.conf file

Marchiuz

New Pleskian
Server operating system version
AlmaLinux 8.4 x86_64
Plesk version and microupdate number
Plesk Obsidian 18.0.41.1
I have a need to OVERWRITE (not append, not extend but OVERWRITE - vhost_nginx.conf is not an option, neither is the additional directives in plesk panel) the core nginx.conf file. More specifically, I need to change how php-fpm listener behaves. By default it uses php-fpm.socket file, and this approach not as scalable as a different solution we have found - use tcp port, which made our project be able to handle larger traffic.
Basically, I need to replace this line in /var/www/vhosts/system/domain/conf/nginx.conf
Code:
fastcgi_pass "unix:/var/www/vhosts/system/api.supermatematik.dk/php-fpm.sock";

With this line
Code:
fastcgi_pass 127.0.0.1:9001;

Currently we see three options:
1. Refactor our project to use swoole instead of php-fpm - costly solution
2. Overwrite access for this nginx.conf file so that even plesk can't edit it
3. Move to a different hosting without Plesk because all of these limitation are seriously annoying.

...but a more sensible solution would be much appreciated, thanks.
 
By default it uses php-fpm.socket file, and this approach not as scalable as a different solution we have found - use tcp port, which made our project be able to handle larger traffic.
Huh? That's strange - a socket should always be faster than a tcp port because it doesn't need a tcp handshake on every connection.
If it isn't, there is something very wrong with the way Plesk's php handles sockets.
@IgorG Maybe this is also the cause for the complaints about slow php in other threads?
 
Back
Top