nginx

Nginx fixes in config

To detect if there are any errors:

nginx -T

To fix 504 Timeout error: 

upstream timed out: fastcgi_read_timeout 600s;

To fix error "upstream sent too big header while reading response header from upstream" need to append the following directives:

fastcgi_buffers 16 32k;
fastcgi_buffer_size 64k;
fastcgi_busy_buffers_size 64k;
#fastcgi_buffering off;
large_client_header_buffers 4 8k;

How to Install or Upgrade PHP 8.1 on Ubuntu 20.04

sudo apt install software-properties-common

sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php8.1 php8.1-fpm

sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl -y

cd /etc/nginx/sites-available/


sudo touch drupal.conf

Subscribe to nginx