开发者社区> 芷沁> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

How to Apply Alibaba Cloud Object Storage Service Resources to Websites

简介: This article discusses the various applications of OSS and addresses some of the most common issues when applying OSS to websites.
+关注继续查看

Redis_and_Memcached

Alibaba Cloud Object Storage Service (OSS) can be used for all kinds of static resources. In this article, we will discuss how to apply OSS resources to a website and examine why a website may fail to be accessed after OSS has been applied.

Applying OSS Resources to a Website

A user can store static resources, such as images, documents, and multimedia files, on OSS and bind a custom domain name to an OSS bucket.

Bind custom domain name to OSS: OSS domain name binding

For example, if the user's website is www.a.com and it contains a static resource 1.jpg , the user can store 1.jpg on the OSS bucket and bind the domain name oss.a.com to the bucket. The previous URL link for www.a.com was www.a.com/1.jpg, but now it can be changed to oss.a.com/1.jpg. If everything is done correctly, the OSS resource will be available on the website.

How to Migrate Static Resources to OSS

There are a few options to migrate static resources to OSS.

1) Iterate over each static resource you wish to migrate and call the putObject method in the SDK to upload them to the OSS: SDK object upload

Note: This requires prior knowledge in programming

2) Call ossimport to migrate. This requires a Java development environment and ossimport tool. The tool itself is quite simple. See OSSimport data migration tool

3) Search for third-party client tools in the Alibaba Cloud Marketplace to migrate your data

How to Obtain the URL Link of an Object

After successfully uploading your resources, if the bucket is Public-Read, the user can access the object through URL like so: bucketname.oss-cn-hangzhou.aliyuncs.com/objectname;

You can also obtain the URL link of the object through OSS Console. Go to the specific bucket, find your object, select Object Management, and click Obtain Address.

Another option is to obtain the URL through the SDK.

Obtain a signed URL: Obtain signed URL through the SDK

Obtain an unsigned URL: Obtain unsigned URL through the SDK

Sending Newly Uploaded Resources on the Website to OSS

1) This website integrates an OSS WEB direct transfer demo for directly transferring resources from website to OSS, see direct resource transfer from website to OSS

2) This website integrates OSS Javascript SDK for directly transferring resources from website to OSS, see apply OSS in Javascript browser

3) Use the OSSFTP tool to apply bucket resources, see OSSFTPserver deployment

First invoke a server to deploy the OSSFTP server, and the FileZilla client to connect to the FTP server. After successfully testing the link, configure FTP for the website, then connect to the OSSFTP server and OSS

For Discuz configuration, see Discuz configuration

For PHPwind configuration, see PHPwind configuration

For WordPress configuration, see WordPress configuration

Troubleshooting Website Access Issues after Applying OSS

Check if the website domain name is bound to the bucket on your console. Go to Console > OSS > Specific_Bucket_Name > Domain Name Management.

Cause: An application's domain name originally had either an A record or CNAME record. After binding the bucket, as the domain name CNAME now redirects to the bucket's external address, it no longer points to the original service, which leads to failed requests to the original website.

Solution: Unbind the website domain name from the bucket and use a sub-domain name to bind to the bucket (make sure that the sub-domain name is not open to external services), for example oss.a.com or any other sub domain name.

Return the A record /CNAME record of the website domain name from the domain name server to the original website, and bind oss.a.com to the external address of the bucket.

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
How is note created - SAP backend implementation
How is note created - SAP backend implementation
0 0
backend system available odata service detection
Created by Wang, Jerry, last modified on Jan 17, 2015
0 0
How to Automate Backups with Alibaba Cloud Object Storage Service
In this tutorial, we will explore how we can automatically upload backups to Alibaba Cloud OSS with Minio Client and cronjob.
4640 0
Three Reasons to Add Alibaba Cloud to Your Multi-Cloud Strategy
From the minute you chose one of the world’s most popular cloud computing companies as your strategic cloud services provider, your world became multi-cloud.
1621 0
Introduction to Alibaba Cloud Container Service
In this whitepaper, we will take a look at the technologies and origins of containerization, as well as its benefits and challenges.
913 0
Key Management Services Android Demo using Alibaba Cloud KMS Service
In this tutorial, we will explore how to use the Key Management Service to create, control, and manage your encryption keys on your mobile device.
1628 0
Setting up a Production Docker Environment with Alibaba Container Service
Due to the portability, flexibility, and maintainability of containers, it's no surprise that Docker is a favorite amongst DevOps practitioners.
1474 0
Creating a Map Service Browser
Concepts A Web service is a set of related application functions that can be programmatically invoked over the Internet.
821 0
+关注
芷沁
https://www.alibabacloud.com/blog/
文章
问答
文章排行榜
最热
最新
相关电子书
更多
Azure Container Services --The best place to run your workload
立即下载
Elasticsearch diagnose and index lifecycle management services
立即下载
In-Flux Limiting for a Multi-Tenant Logging Service
立即下载