In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This time, we will introduce another function of Azure Storage, static website, as its name implies, which is a static website. We all know that storage is used to store some unstructured data. If a website contains only static content, then as long as the data is stored in storage, then users can actually use the function of staticc website to allow users on internet to visit the site. There is no need for a middleware platform for host. For some small websites, it is absolutely a sharp weapon to save money!
Previously, this function is only available in Global Azure, but now 21V Azure can also use this function. There is not much to say in concept, so let's take a look at how to operate it first.
1. First of all, let's create a storage account. the process is relatively simple, not to mention.
two。 Next, we need to create a container called $web, and the code of the website will be saved in this container, so that storage will read the content of the website from here. As for the access level, it does not need to be specifically set to public,private.
3. Next is the question of how to upload our code to this container. There are several ways to consider it.
1.Portal upload
2.AzCopy
3.Azure Storage Exploer
4.Az PowerShell or CLI
These methods are recommended to use the second or the third, which are more intuitive and convenient. Here are the code files uploaded directly with Azure Storage Explorer.
4. The upload method is very simple. You can upload the entire folder directly.
5. After the code is uploaded, we can turn on this function directly in static website, and then set up a home page we want
6. After opening it, we will get the endpoint of a website, which is equivalent to the URL of this website.
7. Try to visit this URL and we can see the content of our website! Because it is anonymous, even if our storage access level is private, we can access it directly from internet.
8. After that, if we want to set up our own domain name, we can actually add the domain name to storage, set a DNS record for CNAME, and jump to the default endpoint we got earlier. In this way, the experience is very similar to a normal website.
Generally speaking, it is easy to operate and cost-effective, which is much cheaper than using a VM or app service to host websites, but there are some relative limitations.
1. Server-side interaction is not supported
two。 CORS is not supported
So if it's a more complex site, it's more appropriate to consider features like VM or app service.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.