doc-exports/docs/obs/umn/obs_03_0031.html
zhangyue 92e44874e7 OBS UMN DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-11-06 14:33:05 +00:00

17 lines
3.3 KiB
HTML

<a name="obs_03_0031"></a><a name="obs_03_0031"></a>
<h1 class="topictitle1">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 you upload a file to a bucket, you can access this file using the bucket's access domain name by default. If you want to use a custom domain name to access the file, bind the custom domain name to the bucket.</p>
<p id="obs_03_0031__p1268192674512">Assume that you have a domain name <strong id="obs_03_0031__b3866548183611">www.example.com</strong> and you upload an image <strong id="obs_03_0031__b1550171510379">image.png</strong> to an OBS bucket. As long as 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 <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 the request to the <strong id="obs_03_0031__b870011114019">image.png</strong> file stored in the bucket. This way, 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">Constraints</h4><ol id="obs_03_0031__ol731571145812"><li id="obs_03_0031__li83151511175819">Only buckets whose version is 3.0 or later support the configuration of user-defined domain names. 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">User-defined domain names currently allow requests over HTTP, instead of HTTPS.</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">The suffix of a user-defined domain name can contain 2 to 6 uppercase or lowercase letters.</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0030.html">Configuring User-Defined Domain Names</a></div>
</div>
</div>