×
Community Blog Using OSS to Publish a Static Website

Using OSS to Publish a Static Website

Learn how to publish a static website using Alibaba Cloud services and complete the ICP process.

By Alibaba Cloud Academy

Interested to learn more about Alibaba Cloud? Check out our course on Using OSS to Publish a Static Website in China and get certified today!

In this blog, we'll talk about everything you need to host a static website. First, let's talk about the differences between static websites and dynamic websites.

Static vs. Dynamic Websites

Static websites consist of a series of HTML files, each one representing a fiscal page of the website. On static websites, each page is a separate HTML file. For example, when you visit the website's home page, the things you are viewing are the same as the actual home page file. If two pages contain a lot of identical content, such as the same filter, if you want to update the filter, you must do it twice – once on the first page and once on the second page.

Dynamic websites use server-side languages, such as PHP or GSP, to dynamically build the website when a user visits the page. When a user goes to the web address, the server finds different pieces of information, writes it onto a single, cohesive page, and presents the final version on-screen. As the name suggests, compared to a static website, on a dynamic website, the content is generated dynamically and changes regularly. Along with using server-side languages, dynamic websites may generate different HTML for each request. The page contains a server-side code that allows the server to generate unique content when the page is loaded. When building a dynamic website, a content management system (CMS) is often used to save development time and take advantage of its rich plug-ins.

Building Your First Static Website

Now that you know the differences between static and dynamic websites, we can talk about what you need to host a static website. To publish a static website, all you will need is a web server running an HTTP server service like Apache or Nginx on it. Then, you can upload your static website to the appropriate directory.

There is also another way to do it. You can use a web hosting service (or a service that supports web hosting) to upload your steady website. Then, you can leave the underlying O&M tasks to the service provider. You could use the Alibaba Cloud Elastic Compute Service (ECS) to get a cloud server and run an HTTP server service like Nginx on it. You could also use a web storage hosting service like Alibaba Cloud Object Storage Service (OSS).

We suggest using OSS because it supports web hosting. When comparing the O&M costs between OSS and ECS, OSS is more cost-effective. You can find the full guide by clicking here.

You could also consider creating a serverless static website, but we'll leave that topic for another time. If you're interested, you can learn more about it in this article.

Using OSS to Publish a Static Website in China

You may be wondering, "how can I build a website in China without being in the country?" Alibaba Cloud has a simple solution. You will need an Alibaba Cloud account, a functioning OSS instance, and a valid ICP license for your website. If you're not sure how to get an ICP license, check out this blog to learn more. You can also take the Clouder course on "Building a Static Website in China."

Ready to test your knowledge? Take the Using OSS to Publish a Static Website in China course and get certified today!

0 1 0
Share on

Alibaba Cloud_Academy

60 posts | 47 followers

You may also like

Comments