nginx php fpm update

apt upgrade php-fpm

apt-get remove --auto-remove php7.2-fpm

ln -s /lib/systemd/system/php7.1-fpm.service /lib/systemd/system/php-fpm.service



ln -s /lib/systemd/system/php8.0-fpm.service /lib/systemd/system/php-fpm.service

 



nginx: [emerg] unknown log format "bytes" in vestacp

fter some talk with the guys at freenode #nginx channel, I got into this documentation about 'log formats':
http://nginx.org/en/docs/http/ngx_http_ ... ml#example

CODE: SELECT ALL

log_format compression '$remote_addr - $remote_user [$time_local] '
                       '"$request" $status $bytes_sent '
                       '"$http_referer" "$http_user_agent" "$gzip_ratio"';

access_log /spool/logs/nginx-access.log compression buffer=32k;

Basically we're making an alias 'compression' that can then be issued as a directive like that:

CODE: SELECT ALL

access_log /spool/logs/nginx-access.log compression buffer=32k;

Knowing that, I've edited '/etc/nginx/nginx.conf' and between line 'log_format main (...)' inside http {
and before 'access_log'; basically defining a new alias for a log_format, I inserted the following:

CODE: SELECT ALL

log_format  bytes   '$body_bytes_sent';

after adding result will be this

log_format compression '$remote_addr - $remote_user [$time_local] '
                       '"$request" $status $bytes_sent '
                       '"$http_referer" "$http_user_agent" "$gzip_ratio"';
log_format  bytes   '$body_bytes_sent';
access_log /spool/logs/nginx-access.log compression buffer=32k;


ERROR: unable to bind listening socket for address '/run/php/php8.0-fpm.sock': No such file or directory


mkdir -p /var/run/

php-fpm pool doesn't exist



I've found a dirty workaround for this issue, because your approach doesn't work for me at all, unfortunately.
User would just hardcode existing version of php-fpm in /usr/local/vesta/func/domain.sh at line 87

pool=$(find -L /etc/php/8.0/ -type d \( -name "pool.d" -o -name "*fpm.d" \))

Then everything works fine.



---------------------------------------------------------------------


rebuild config 


v-rebuild-web-domains $USER


and reboot after phpfpm update as without reboot old one still works

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation