[Upload] Nginx + PHP7.4 Upload 설정
Nginx + PHP7.4 Upload 설정
# vi /etc/php/7.4/fpm/php.ini
upload_max_filesize = 500M
post_max_size = 500M
memory_limit = 256M
max_execution_time = 1000
file_uploads = On
# vi /etc/nginx/nginx.conf
http {
##
# Basic Settings
##
# Tony Kang : Add upload performance
client_max_body_size 500m;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
# service nginx restart
# service php7.4-fpm restart
설정에 따른 업로드 비교
설정을 안하고 Default로 업로드 하는 경우 | 설정을 완료 하고 업로드 하는 경우 |
2022.04.10 02:21:11 Log Start[0] [02:21:11] [name] = [1234.pdf] [02:21:11] [type] = [] [02:21:11] [tmp_name] = [] [02:21:11] [error] = [1] [02:21:11] [size] = [0] 중간로그 생략 Log End | 2022.04.10 02:59:51 Log Start[0] [02:59:51] [name] = [1234.pdf] [02:59:51] [type] = [application/pdf] [02:59:51] [tmp_name] = [/tmp/phpXHCk2o] [02:59:51] [error] = [0] [02:59:51] [size] = [5155184]
Log End |