"Nanny-level tutorial" upload the local code to the server and then access it through the domain name

前言:本篇文章主要详细说明了,如何将本地代码上传至服务器后,访问域名就可以正常访问网站

1. Things to prepare

1. A cloud server can be 轻量的服务器, or 云服务器. Unskilled or novices can first use the lightweight cloud server Tencent Cloud and you can try it for 1 month first.
2. Domain name registration. Choose a domain name and register it. 建议不要注册一个顶级域名.comThis will be more expensive, but it will be cheaper to find some partial domain names.

Second, the cloud server step process

  1. After entering, first authenticate the Tencent Cloud account with real name. After authentication, choose to try a lightweight server
    Tencent Cloud activity address

Insert picture description here

  1. Buy a domain name

Insert picture description here

  1. Server configuration
    Click here to reset the reference application and change it to the pagoda panel Insert picture description here
    . 4. After changing the mirror information, click on the application management above to prepare to log in.
    Insert picture description here
    5. Click log in to copy the next command and paste it in, and press the enter key
    first Line: The front is the IP address of your server, and the back is the port number 8888. The
    second line is the user name. The
    third line is the password.
    Insert picture description here
    6. This is directly IP地址加端口号在浏览器打开是访问不了的喔!because our firewall does not allow port 8888 to be released, so it cannot be accessed.
    7. Click above. Firewall-add rules-the protocol is TCP-the port number (8888) to be allowed and
    click OK.
注意后面要是需要开放端口或者连接的话,都要在这里添加规则

Insert picture description here
8. Now you will open the pagoda panel at the address before logging in in the browser, and enter the account and password to log in.
Insert picture description here
9. This is a panel of the pagoda. Click on the FTP site to create an FTP.
Insert picture description here
10. Download a software for transferring FTP. There are many, I won’t elaborate on them here. Upload to its root directory
Note: 上传的文件外面不能有包裹住的文件名称
You can directly access the index.html file under the root folder of the site.
Insert picture description here
11. Click on the website-add site
. Fill in the domain name above and
select the root directory of the FTP site you just applied for . File root directory
Click Submit
Insert picture description here
12. This completes the configuration on the server side, but do you think the domain name can be accessed now?
The answer is: NO
Insert picture description here

Third, on the authentication and analysis of domain names

Because under the Ministry of Industry, the domain name is to conduct real-name authentication, service status here to be normal to the line, on this page you can add authentication, personal authentication is usually a working day
Insert picture description here
Click resolve button, go to resolve
Insert picture description here
resolved, it is now You can test
whether there is a problem with the
domain name. The diagnostic tool under the domain name registration
Insert picture description here

Insert picture description here
Here is the display that the domain name can be accessed, but there is no record.
If there is an error message, just follow the error message.
Now the domain name can visit the website normally, 但是由于我们没有备案,只能临时访问几个小时就会无法访问了,需要提供备案信息and after that , the general steps are like this. If you don’t understand, you can leave a message in the comment area, and I will reply you when I see it!

The code word is not easy, I hope it can be triple connected with one key! ! !

Guess you like

Origin blog.csdn.net/weixin_45054614/article/details/114217440