![]() ![]() In short you need the following line in nf and php.ini using the grep command/egrep command/tail command: $ grep client_max_body_size /etc/nginx/nf Restart your Nginx PHP-fpm service: $ sudo systemctl start php-fpm Post_max_size=10M Save and close the file. ![]() Make sure you watch nginx error log too: $ sudo tail -f /var/log/nginx/error.log How to configure php to accept upload upto 10MBĮdit your php.ini file and make sure the following two line present in it: $ sudo vi /etc/php.iniĪppend or edit as follows: upload_max_filesize=10M $ sudo service nginx reload Verify configuration by uploading a large file. Nginx: configuration file /etc/nginx/nf test is successful If no error means, restart the nginx web server. Sample outputs: nginx: the configuration file /etc/nginx/nf syntax is ok Test nginx configuration for error Run the following command: $ sudo nginx -t First you need to edit the /etc/nginx/nf file by typing the vi command: $ sudo vi /etc/nginx/nf In http (server/location) section add the following directive to set the maximum allowed size in 10MB:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |