Static page hosting on oss
Created#More Posted time:Jan 30, 2020 17:51 PM
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.
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:Feb 1, 2020 10:50 AM
Most welcome, let us know how it goes...
2nd Reply#Posted time:Jan 31, 2020 10:47 AM
Tks Sundaram and kcloud, will give it a try
3rd Reply#Posted time:Jan 30, 2020 20:45 PM
Binding custom domain name will make it work.
Check out the tutorial: Host a static website using a custom domain name
Also, refer: Host a Static Website on OSS
4Floor#Posted time:Jan 30, 2020 20:04 PM
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