SERVER/LARAVEL & PHP
The \"\" file does not exist or is not readable 오류 해결
나나나나나나나ㅏ나난ㄴ나ㅏ나나
2021. 8. 4. 18:58
728x90
개발환경
- ubuntu 20.04
- nginx
- php 7.4
해당 오류는 파일의 크키가 서버설정보다 클 경우에 발생하는 오류로, 서버 파일 업로드 제한을 늘려주어야한다!
참고로 nginx 기본 파일 크기 제한은 1MB
나는 nginx 와 php 를 사용하고있었기 때문에 nginx 와 php 모두 설정을 변경해주어야했다
nginx
/etc/nginx/sites-available/default
server{
client_max_body_size 50M;
nginx 서버 설정해주는 파일에서 서버 아래에 body 사이즈 제한을 1MB가 아닌 다른 원하는 크기로 변경해준다
php
/etc/php/7.4/php-fpm/php.ini
upload_max_filesize = 50M
post_max_size = 50M
사용하고있는 php 버전에 들어가서 찾아서 원하는 제한 크기로 설정해주면 된다
모두 설정해 준뒤
service nginx restart 와 service php7.4-fpm restart 로 새로 시작해주면 설정완료!
728x90