on
[리눅스] NGINX, PHP 파일 업로드 크기 제한 변경
[리눅스] NGINX, PHP 파일 업로드 크기 제한 변경
728x90
NGINX, PHP 파일 업로드 크기 제한 변경
nginx.conf 설정
$ vim /etc/nginx/nginx.conf ... client_max_body_size 64M; client_body_timeout 60s;
https://runebook.dev/ko/docs/nginx/http/ngx_http_core_module
http://nginx.org/en/docs/http/ngx_http_core_module.html
php.ini 설정
$ vim /etc/php.ini 376 ;;;;;;;;;;;;;;;;;;; 377 ; Resource Limits ; 378 ;;;;;;;;;;;;;;;;;;; 379 380 ; Maximum execution time of each script, in seconds 381 ; http://php.net/max-execution-time 382 ; Note: This directive is hardcoded to 0 for the CLI SAPI 383 max_execution_time = 300 384 385 ; Maximum amount of time each script may spend parsing request data. It's a good 386 ; idea to limit this time on productions servers in order to eliminate unexpectedly 387 ; long running scripts. 388 ; Note: This directive is hardcoded to -1 for the CLI SAPI 389 ; Default Value: -1 (Unlimited) 390 ; Development Value: 60 (60 seconds) 391 ; Production Value: 60 (60 seconds) 392 ; http://php.net/max-input-time 393 max_input_time = 60 394 395 ; Maximum input variable nesting level 396 ; http://php.net/max-input-nesting-level 397 ;max_input_nesting_level = 64 398 399 ; How many GET/POST/COOKIE input variables may be accepted 400 ; max_input_vars = 1000 401 402 ; Maximum amount of memory a script may consume (128MB) 403 ; http://php.net/memory-limit 404 memory_limit = 256M 405 668 ; Maximum size of POST data that PHP will accept. 669 ; Its value may be 0 to disable the limit. It is ignored if POST data reading 670 ; is disabled through enable_post_data_reading. 671 ; http://php.net/post-max-size 672 post_max_size = 64M 810 ;;;;;;;;;;;;;;;; 811 ; File Uploads ; 812 ;;;;;;;;;;;;;;;; 813 814 ; Whether to allow HTTP file uploads. 815 ; http://php.net/file-uploads 816 file_uploads = On 817 818 ; Temporary directory for HTTP uploaded files (will use system default if not 819 ; specified). 820 ; http://php.net/upload-tmp-dir 821 ;upload_tmp_dir = 822 823 ; Maximum allowed size for uploaded files. 824 ; http://php.net/upload-max-filesize 825 upload_max_filesize = 64M 826 827 ; Maximum number of files that can be uploaded via a single request 828 max_file_uploads = 20 829
728x90
from http://sangchul.kr/1113 by ccl(A) rewrite - 2021-09-28 10:00:41