$ sudo systemctl reload nginxsudo apt update sudo apt install nginxsudo apt update sudo apt install nginxsudo nano /etc/nginx/sites-available/example.comserver { listen 80; server_name example.com; root /var/www/example.com/public; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; } location ~ /\.ht { deny all; } }sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/sudo systemctl restart nginxsudo apt install php-fpm php-mbstring php-xml php-zip php-mysqlcd /var/www/example.com/ sudo chown -R www-data:www-data storagesudo killall nginx sudo systemctl start nginx## Installing latest version ( # current latest version: 1.25.3 - 2023-10-24 # Install need libraries sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring # Fetch key curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null # Add repository echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list # update and install nginx sudo apt update sudo apt install nginx sudo ln -s /etc/nginx/sites-available/domain.host /etc/nginx/sites-enabled/sudo apt update sudo apt install nginx