Reads:2650Replies:5
Static page hosting on oss
hi all,
i am trying out the static page hosting on oss but to my surprise it does not load the index.html static page at all. Steps takem: 1. Create oss bucket set Basic Setting -> ACL = Public Read 2. Set Static Pages -> Default Homepage = index.html 3. Set Static Pages -> Default 404 Page = error.html 4. Upload index.html & error.html into the bucket 5. Access the bucket via https://bucket-name.oss-region.aliyuncs.com/ will download the index.html page instead of displaying the content. 6. Access the non-existing page will show the error.html May i know what else am i missing in the above steps. |
|
1st Reply#
Posted time:Apr 4, 2022 10:52 AM
Just 1 more step you need
Map the custom domain name to the bucket Map the registered custom domain name example.com to the examplebucket bucket that you create to use the domain name to access the bucket.
cheers,ray |
|
2nd Reply#
Posted time:Feb 1, 2020 10:50 AM
Most welcome, let us know how it goes...
|
|
|
3rd Reply#
Posted time:Jan 31, 2020 10:47 AM
Tks Sundaram and kcloud, will give it a try
|
|
4Floor#
Posted time:Jan 30, 2020 20:45 PM
Hi,
Binding custom domain name will make it work. Check out the tutorial: Host a static website using a custom domain name https://www.alibabacloud.com/help/doc-detail/67323.htm Also, refer: Host a Static Website on OSS https://www.alibabacloud.com/getting-started/projects/host-a-static-website-on-oss Cheers, K |
|
|
5Floor#
Posted time:Jan 30, 2020 20:04 PM
Hi Marcuslow,
The above steps seems correct. But From August 13th, 2018 onwards, when you use an OSS endpoint to access a web file through the Internet, the Content-Disposition: 'attachment=filename;' is automatically added to the Response Header, and hence the web file is downloaded as an attachment. If you access OSS with a user customer domain, the Content-Disposition: 'attachment=filename;' will not be added to the Response Header. For more information about using the user domain to access OSS, see Bind Custom Domain Names. Refer to the link below.https://www.alibabacloud.com/notice/oss0813 Thanks. Regards, Sundaram |
|