• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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