brunch
매거진 kakao cloud

카카오 클라우드 4탄-6. 오브젝트스토리지로 웹서비스

by Master Seo

오프젝트 스토리지로 웹서비스 만들어보자~

CDN 도 연동해보자




<1> 오프젝트 스토리지로 웹서비스 만들기

<2> CDN 연동하기

<3> 참고 사이트




<1> 오프젝트 스토리지로 웹서비스 만들기


1

오브젝트 스토리지 버킷 생성하기


1

100 ob.png



2

110 ip.png



3

static-web/index.html


static-web/images 폴더



images 폴더에 이미지 넣기

curl -o ~/Downloads/static-web/images/hands-on.png https://objectstorage.kr-central-1.kakaoi.io/v1/d12202537d5c4fc4a177698f0e92bc82/hands-on-bucket/static-web%2Fhands-on.png



4

index.html 만들기


cat <<EOF > ~/Downloads/static-web/index.html


<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>kic-hands-on test page</title>

</head>

<body>

<h1>My test page</h1>

<img src="images/hands-on.png" alt="My test image">

</body>

</html>

EOF




5

index.html에서 URL 복사



6

웹 접속

URL의 구조는

https://{objectstorage-address}/{project-ID}/{bucket-name}/{object-path}로 되어 있어


오류




160 오류.png



CDN으로 해결 하자.




<2> CDN 연동하기



1

web-hands-on-cdn

오리진 서버 = 버킷 선택

/static-web

170 cdn.png



2

시작



3

도메인 xxxxxxxxxx.com/index.html로 접속


확인

180 ok.png




<3> 참고 사이트


https://docs.kakaocloud.com/tutorial/fundamentals/object-storage-cdn-static-website



몰아보기

https://brunch.co.kr/@topasvga/3651



감사합니다.

keyword
매거진의 이전글카카오 클라우드 4탄-5. NAT인스턴스