Hi there,
I spent hours researching how I could change nginx to use TCP/IP rather than a unix socket to connect to PHP-FPM.
In /etc/nginx/nginx/conf (global) I could see that this configuration was indeed set but noticed in the error_logs for nginx, that any domain (i.e. vhost) was still using unix sockets causing connectivity issues (slow page loading when ~100 concurrent users).
So I went to /var/www/vhosts/xxxx/conf/last_nginx.conf and noticed that the file is auto-generated and contains
which is the issue! It was stopping any vhost from using the TCP/IP connection rather than a unix socket.
I tried placing
into the Plesk web panel (i.e. the Web Settings NGINX directives) but it wouldn't accept it to override the Plesk generated config.
So I looked in /usr/local/psa/admin/conf/templates/ and tried to see if there was a nginx template but I can't see which file places the above line into the vhost configs.
Once I manually edited the "last_nginx.conf" I could have very large concurrent users on the my website. Is there a way to permanently edit this line?
Thanks,
Theo
I spent hours researching how I could change nginx to use TCP/IP rather than a unix socket to connect to PHP-FPM.
In /etc/nginx/nginx/conf (global) I could see that this configuration was indeed set but noticed in the error_logs for nginx, that any domain (i.e. vhost) was still using unix sockets causing connectivity issues (slow page loading when ~100 concurrent users).
So I went to /var/www/vhosts/xxxx/conf/last_nginx.conf and noticed that the file is auto-generated and contains
Code:
fastcgi_pass "unix:/var/www/vhosts/system/xxxx/php-fpm.sock";
I tried placing
Code:
fastcgi_pass 127.0.0.1:9000;
So I looked in /usr/local/psa/admin/conf/templates/ and tried to see if there was a nginx template but I can't see which file places the above line into the vhost configs.
Once I manually edited the "last_nginx.conf" I could have very large concurrent users on the my website. Is there a way to permanently edit this line?
Thanks,
Theo