본문 바로가기
반응형

전체 글213

[nginx] 413 Request Entity Too Large 해결 ngix에서 파일 업로드 시 413 Request Entity Too Large에러가 뜨면서 파일 전송에 실패한 경우가 생겼다 php.ini 설정 post_max_size, upload_max_filesize 도 적절한 값으로 설정이 되어있다면 nginx.conf를 수정해야 한다 nginx편집 /etc/nginx/nginx.conf 파일에 http 부분 추가로 작성 http { //http 요청 본문 크기 제한 client_max_body_size 10M; } 설정 후 nginx 서버 재시작 sudo service nginx restart 정상적으로 파일이 전송되는 걸 확인 2024. 3. 27.
[Spring Boot] jar 파일 만들고 실행, 프로파일 설정 프로젝트를 배포할 때 jar파일을 생성하여 실행하는 방법 1. 빌드 방법 - cmd 창 gradlew이 있는 폴더에서 터미널을 열어 명령어 입력 gradlew build - intellij 프로젝트 빌드 2. 실행 방법 \build\libs 폴더에서 아래 명령어 실행 java -jar data-jpa-0.0.1-SNAPSHOT-plain.jar 프로파일이 설정된 프로젝트라면 뒤에 —spring.profiles.active=local 추가 java -jar data-jpa-0.0.1-SNAPSHOT-plain.jar —spring.profiles.active=local 2024. 3. 25.
nginx 에러로그 실시간 확인 하는 명령 sudo tail -f /var/log/nginx/error.log 이 명령어를 실행하면 로그 파일의 끝에서부터 새로운 로그 메시지를 실시간으로 표시 sudo: 명령어를 슈퍼유저(root) 권한으로 실행합니다. tail: 파일의 끝에서부터 지정된 수만큼의 행을 출력하는 명령어입니다. -f: 파일이 변할 때마다 자동으로 업데이트되도록 지정합니다. /var/log/nginx/error.log: 모니터링할 로그 파일의 경로입니다. 모니터링을 중단하려면 Ctrl + C - tail 명령어 옵션 -n 또는 --lines=: 지정된 숫자만큼의 행을 출력합니다. tail -n 10 /var/log/nginx/error.log -f 또는 --follow: 파일의 끝이 아닌 실시간으로 파일을 모니터링합니다. tail -.. 2024. 1. 25.
[PHP] pre-signed url, s3 객체 다운로드 url aws sdk를 사용하여 pre-signed url 생성하는 방법 - 이전글 참고 2023.10.12 - [Kotlin] - pre-signed url 사용하기, 일정 기간 동안 객체 다운로드 url 생성 pre-signed url 사용하기, 일정 기간 동안 객체 다운로드 url 생성 https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_PresignedUrl_section.html Create a presigned URL for Amazon S3 using an AWS SDK - Amazon Simple Storage Service This documentation is for an SDK in preview release... 2023. 12. 5.
pre-signed url 사용하기, 일정 기간 동안 객체 다운로드 url 생성 https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_PresignedUrl_section.html Create a presigned URL for Amazon S3 using an AWS SDK - Amazon Simple Storage Service This documentation is for an SDK in preview release. The SDK is subject to change and should not be used in production. docs.aws.amazon.com https://docs.aws.amazon.com/ko_kr/AmazonS3/latest/userguide/S3OutpostsSh.. 2023. 10. 12.
[Solved] composer source directory has uncommitted changes RUN composer config discard-changes true composer.json "config": { "discard-changes": true }, 2023. 9. 13.
[Solved] The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed. 위의 에러와 같이 나온 에러에서 NO_PUBKEY라고 KEY 가 두 개 나오는데 차례로 등록하면 된다 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys {PUBKEY} 2023. 9. 13.
[Solved] nginx depends libssl1.1 ( = 1.1.1) but it is not installable DockerFile 빌드할 때 nginx: depends: libssl1.1 ( = 1.1.1) but it is not installable 에러가 났다 echo "deb http://security.ubuntu.com/ubuntu focal-security main" | tee /etc/apt/sources.list.d/focal-security.list \ apt-get update \ apt install libssl1.1 \ 우분투 소스를 추가해서 강제로 libssl1.1 설치 2023. 9. 13.
PHP AWS S3 파일 업로드 하기 zip 파일을 다운로드 받아서 하는 방법도 있지만 aws sdk를 설치하여 사용하면 더 간편하게 사용할 수 있다 composer로 AWS SDK 추가 composer require aws/aws-sdk-php PHP 스크립트에 자동 로드 추가 Amazon S3에서 AWS SDK를 사용하여 객체를 업로드 샘플 코드 require 'vendor/autoload.php'; use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; $bucket = '*** Your Bucket Name ***'; $keyname = '*** Your Object Key ***'; $s3 = new S3Client([ 'version' => 'latest', 'region' => 'us-.. 2023. 8. 25.
반응형