Hướng dẫn cấu hình Configure PHP 7.3-FPM for Nginx :)) da ok

Step 3: Configure PHP 7.3-FPM for Nginx

Now that Nginx and PHP 7.3-FPM are installed, you may want to configure Nginx to use PHP 7.3-FPM properly. The default Nginx PHP-FPM configuration file is at /etc/php/7.3/fpm/php.ini

Open PHP Apache2 configuration file by running the commands below

sudo nano /etc/php/7.3/fpm/php.ini

Then edit the file to suit your environments. Some important lines to consider:

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 64M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Save the file and exit….

Restart Nginx and PHP-FPM

sudo systemctl restart nginx.service
sudo systemctl restart php7.3-fpm

At this point Apache2 or Nginx with PHP or PHP-FPM should be installed and ready to use.. you can test PHP / PHP-FPM settings by creating a blank file…..

sudo nano /var/www/html/phpinfo.php

Then add the line in the file and save.

<?php phpinfo( ); ?>

Link: https://websiteforstudents.com/install-php-7-3-php-7-3-fpm-with-apache2-nginx-on-ubuntu-16-04-18-04-18-10/

Last updated