doc-exports/docs/obs/umn/obs_03_0031.html
Jawei, Li 43ab92496d OBS UMN 2.0.38.SP5
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-07 09:41:09 +00:00

17 lines
3.3 KiB
HTML

<a name="obs_03_0031"></a><a name="obs_03_0031"></a>
<h1 class="topictitle1">User-Defined Domain Name Binding Overview</h1>
<div id="body1528266904098"><div class="section" id="obs_03_0031__section1527515016443"><h4 class="sectiontitle">Application Scenario</h4><p id="obs_03_0031__p759020183106">After a file is uploaded to a bucket, you can access this file using the bucket's domain name by default. If you want to access the file using a user-defined domain name, you can bind this domain name to the bucket.</p>
<p id="obs_03_0031__p1268192674512">Assuming that you have a domain name <strong id="obs_03_0031__b3866548183611">www.example.com</strong> and there is an image <strong id="obs_03_0031__b1550171510379">image.png</strong> in an OBS bucket, after you bind <strong id="obs_03_0031__b19316255153714">www.example.com</strong> to the bucket, you can use <strong id="obs_03_0031__b13967193216388">http://www.example.com/image.png</strong> to access image <strong id="obs_03_0031__b6741171917387">image.png</strong>. The steps below describe the configurations:</p>
<ol id="obs_03_0031__ol19681926114513"><li id="obs_03_0031__li36811261454">Create a bucket on OBS and upload file <strong id="obs_03_0031__b19875581437">image.png</strong> to the bucket.</li><li id="obs_03_0031__li86812026134511">On OBS Console, bind <strong id="obs_03_0031__b573119188431">www.example.com</strong> to the created bucket.</li><li id="obs_03_0031__li20681126144511">On the DNS server, add a CNAME record and map <strong id="obs_03_0031__b1866544108151256">www.example.com</strong> to the domain name of the bucket.</li><li id="obs_03_0031__li15870194016401">Send a request for image <strong id="obs_03_0031__b17648549125016">image.png</strong>. After the request for <strong id="obs_03_0031__b1769811184014">http://www.example.com/image.png</strong> reaches OBS, OBS finds the mapping between the <strong id="obs_03_0031__b126994124012">www.example.com</strong> and the bucket's domain name, and redirects it to the <strong id="obs_03_0031__b870011114019">image.png</strong> file stored in the bucket. That is, a request for <strong id="obs_03_0031__b5565194016405">http://www.example.com/image.png</strong> actually accesses <strong id="obs_03_0031__b1357310406403">http://</strong><em id="obs_03_0031__i75741540134010">Bucket domain name</em><strong id="obs_03_0031__b1557564064010">/image.png</strong>.</li></ol>
</div>
<div class="section" id="obs_03_0031__section1817425811574"><h4 class="sectiontitle">Limitations and Constraints</h4><ol id="obs_03_0031__ol731571145812"><li id="obs_03_0031__li83151511175819">Only buckets whose version is 3.0 support user-defined domain name binding. The version number of a bucket is displayed in the <strong id="obs_03_0031__b0191171144610">Basic Information</strong> area.</li><li id="obs_03_0031__li7811214712">Currently, user domain names bound to OBS only allow access requests over HTTP.</li><li id="obs_03_0031__li1749152513012">A user-defined domain name can be bound to only one bucket.</li><li id="obs_03_0031__li5192942182414">Currently, the suffix of a user-defined domain name can contain 2 to 6 uppercase and lowercase letters.</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0030.html">User-Defined Domain Name Binding</a></div>
</div>
</div>