Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build a website after purchasing a CVM

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to build a website after purchasing a CVM. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

After purchasing a CVM, you need to configure the environment, but it is only with the running and storage space for the website program, and you need to take several other steps to complete the website building process.

Registration of domain name and filing

Think about the domain name you want to register. Search the official website for whether the domain name has been registered. If it is not registered, you can directly pay for it. If it has been registered, you can only change the domain name. After the payment registration is completed, you can see it in the management console.

To use a CVM in mainland China, you need to fill in some information, follow the instructions on the server provider's filing platform step by step, and finally submit it for review and wait.

Perform domain name resolution

After that, you can go to the domain name management console of the cloud service provider to do resolution. You can enter www for the host record, and the record type and resolution line are fine by default. Because your record type is A record, you can enter your host IP. TTL needs to say that for those whose IP addresses are relatively fixed and do not need to be changed frequently, the TTL value can be relatively larger, which helps to improve the stability and speed of domain name resolution; otherwise, enter a smaller value for those that change frequently.

Upload a website project

After the CVM environment is built, you can upload your project directly to the / var/www/html directory. Here, you need to mention that only root users have write permission in the html directory, so you need to modify the html directory permission to 777. Command:

Chmod-R 777 / var/www/html

After the permission modification is completed, you need to find the apache configuration file: / etc/httpd/conf/httpd.conf file, and add a code at the end of the file after opening it:

ServerAdmin webmaster@dummy-host.example.comDocumentRoot / var/www/html/ Project root directory ServerName / / domain name ErrorLog logs/dummy-host.example.com-error_logCustomLog logs/dummy-host.example.com-access_log common

Restart apache corresponding to the modification of DocumentRoot and ServerName:

Service httpd restart

Here the website can be visited normally, open the browser and enter your registered domain name, you will be able to open your own website.

This is enough about how to build a website after purchasing a CVM. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report