Secure and Quick Way of Hosting — AGC Cloud Services

Enes Kocaman
5 min readSep 13, 2020

Hosting provides developers with full-hosting services for static and dynamic web page content. With a single command, websites can be easily deployed and users can access web page content securely and quickly.

How its become easy, secure and quick?

With the Cloud Hosting service, you only need to focus on developing the UI interaction, website style, and service logic, without concerning about cloud-side deployment details, for example, domain name application and certificate management. In addition, you also do not need to concern about the website distribution in the CDN(Content Delivery Network). This allows you to build secure websites that can be accessed quickly.

You can provide in-app websites and static websites for users without any cloud devices.

What is Core Functions of Cloud Hosting?

  1. Full hosting of dynamic and static web pages: integration with Cloud Functions to provide dynamic content access.
  2. Configurable access rules: The error page, rewriting rule, response header, and cache rule can be configured
  3. Multi-version management: supports multi-version management and one-click rollback.
  4. The one of the crucial feature for users of this service is Customized Domain Name, it will be available in Q4 2020.

Why do we need to use AGC Cloud Hosting?

Cloud Hosting has four major advantages, those are;

  1. Fast Deployment
  2. Smooth Access
  3. Secure Access
  4. Dynamic Web Site Content

Fast deployment helps you quickly deliver a website. This is includes several different functions.

Fast Deployment

  • One-click Deployment : Allows the Cloud Hosting portal to quickly deploy different versions of your website while it is live.
  • One-click Rollback : Enables Cloud Hosting to roll back your website to a previous version.
  • Built-in domain name : Hosting provides a uniform base domain name which is “hosting-dre.agconnect.link”. Under the base domain name, you can allocate an access domain name for your web-site. This frees you from buying an independent domain name.
  • Custom Domain Name : You will have an opportunity to exchange build-in domain name with your custom domain name in the Q4 2020.

Smooth Access

Cloud Hosting provides a CDN(Content Delivery Network) acceleration capability for each hosted website, and ensures smooth access to your website through abundant CDN nodes.

Secure Access

Another advantage of Cloud Hosting is secure access. In addition to domain name access and CDN acceleration, Cloud Hosting provides a CA certificate for each hosted website to implement HTTPS-based secure access.

Dynamic Web Site Content

Cloud Hosting can be used together with AGC Cloud Functions to provide dynamic website content.

How to use it?

I thought, a sample application would be helpful to be more familiar with about AGC Cloud Hosting. You can also have a try to this demo application and share your ideas with in comments.

Before using AGC Cloud Hosting to host your website, first you need to have a Huawei Developer Account and then develop your website and package your website files into a hosting package.

You can refer to following document if you are creating an app on Huawei Developer Console for first time.

You need to enable Cloud Hosting service from your project settings on App Gallery Console.

Your website files must meet the following requirements:

• File type: Your website file types must be supported by the browser.

• Access entry: The index.html file in the root directory of the hosting package is used as the default home page of your website.

• Hosting package format: The hosting package must be in ZIP format.

I have planned to publish a web site that shows current weather conditions of a city(i.e. Istanbul) by sending get requests to weather API.

Web site will;

As you can see in above we can consider to design folder structure as below;

  • /js/yourjsfile.js
  • /css/yourcssfile.css
  • index.html (must have)

If you want to use additional sub-folders like “utils” or “images” you just need to create them according to file structure above. (Those folders can not be empty)

Script.js

style.css

index.html

Our folders are almost ready. Now, we just need to zip all those as shown in below.

ZIP Format

If you didn’t enable Cloud Hosting from your console page. You can do this as shown below.

Select a prefix domain name for your web-site, i choosed “enskcmn” and my web site url will be : “enskcmn.dre.agchosting.link

Web site URL

Upload your zip file into hosting.

When you see status as Released it means you can visit your web site right now. Normally it takes a few minutes to be published.

Here is final result

Final Result

I hope this article helps for you to gain insight about what is Cloud Hosting, advantages and usage scenarios. I am planning publish a new article on this topic to demonstrate how to Customize Domain name when this feature is available in EU site.

--

--