当前位置:网站首页>Epidemic data analysis platform work report [3] website deployment

Epidemic data analysis platform work report [3] website deployment

2022-06-12 04:13:00 m0_ fifty-five million six hundred and seventy-five thousand ei

As it is an engineering project , Therefore, our data platform must eventually be deployed to the cloud . Finally, the supplier we chose was Alibaba cloud , We'll talk about the special content about this supplier platform later . Here we will only explain the content of universality .

Deployment of the website

Let's first look at a new way :
github Managed server for .

establish github project

Create a new project . Fill in the basic information of the project , Click on Create Repository confirm .
 Insert picture description here

find Github Pages Options , take Source Change it to master branch, Finally, click Save Button  Insert picture description here

Finally get a link , Through this link, you can access github pages page .

Code clone To local , Add base code

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Github Page demo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="index.js"></script>
</head>
<body>
    <div id="main-content">

    </div>
</body>
</html>
window.onload = function() {
    
  document.getElementById('main-content').innerHTML = 'Hello, github pages :)'
}
#main-content {
      
  font-size: 36px;
  font-weight: bold;
  padding: 16px;
}
> git add .
  git commit -m "Add simple code"
  git push

Waiting for code push After going up , It will take a few minutes to take effect . Open before accessing github pages Options url that will do .

In fact, you can also use your own computer as a server , Then map the port to the public network through a penetration intermediary .

 Insert picture description here

Here is a record of the relevant knowledge about using penetration tools to deploy sites .
What is the intranet
Usually , Intranet It can be simply understood as a network created by a router , Computers connected to this network can access each other .

for instance , Suppose our network architecture is like this :

 Insert picture description here

Connect directly to Xiaoming's router Upper The computer A、 The computer B、 The computer C There is no problem accessing each other , for example :

Xiao Ming is in The computer A The game server is started on , Listening port 20000
Xiaoming uses The computer B Open the game , Connect 192.168.1.2:20000
The computer B Tell the router that it wants to connect 192.168.1.2 Of 20000 port
The router knows that this address corresponds to The computer A, So we set up The computer B <-> The computer A The connection of , In this way, Xiao Ming successfully connected to the game server
Empathy , Connect to Lihua's router There is no problem for several computers on the to access each other .

We can think that several computers under Xiaoming's router are located in the same Intranet in , The computers under Lihua's router are located in Another intranet in .

Xiao Ming and Li Hua communicate with each other
When Xiaoming wants to communicate with Lihua , The problem arises . because Xiaoming's router and Lihua's router There is no direct connection between , Nor is it connected to the same parent route , They don't know how to connect to each other .

If there is a public network IP…
If the operator gives Xiaoming's router or Lihua's router The public network is allocated IP, This problem can be solved easily .

 Insert picture description here
for instance , If Xiao Ming has a public network IP 1.1.1.1, Then Lihua can initiate a campaign against 1.1.1.1 The connection of :

Let's assume that Xiao Ming has configured the router 10000 This port is mapped to The computer A Game server on (20000 port )
Li Hua uses The computer D Open the game , Connect 1.1.1.1:10000
The public network is allocated IP after , Lihua's router You can tell the Internet that it wants to connect 1.1.1.1 Of 10000 port
Because of this public network IP Assigned to Xiao Ming , The router in the Internet will be established Lihua's router <-> Xiaoming's router The connection of
Next , Xiaoming's router It will query the previously configured port mapping and forward the connection to The computer A Of 20000 port
Final , The computer D <-> Xiaoming's router :10000 <-> The computer A:20000 The connection of
If there is no public network IP Well ?
because IPv4 The scarcity of addresses , Three domestic operators ( telecom 、 Move 、 Unicom ) Basically, no public network is allocated to home wide users IP, Not to mention some second tier small operators .

This causes the above connection to fail to be established , because Lihua's router Want to connect to Xiaoming's router You must tell the Internet about the other side's public network IP, But now they are not assigned to the public network IP. At this time , To establish a connection between the two, you need to use intranet penetration or UDP Hole drilling and other techniques .

title HTTP(S) Protocol penetration guide

Default port
HTTP: 80
HTTPS: 443

Confirm the target service
Please confirm that the service to be penetrated can be accessed normally before penetrating , Use the browser to access the service , Refer to the figure below to find the target IP And port :

 Insert picture description here

Select tunnel type
General network providers provide two types of tunnels for penetration HTTP(S) service :
TCP Tunnel
HTTP(S) Tunnel
The difference is :
TCP Tunnel access uses http://www.example.com:12345 such URL form , need With port number , Unwanted Has its own domain name
HTTP(S) Tunnel access uses http://www.example.com such URL form , Unwanted With port number , need Has its own domain name
And there are some limitations :
Use TCP Tunnel time , If the penetration is HTTP agreement , must Use overseas nodes .HTTPS The agreement is not affected .
Use HTTP(S) Tunnel time , Real name authentication must be completed . If domestic nodes are used for penetration , You must use a registered domain name .

Set resolution
HTTP(S) The tunnel must be set with resolution ,TCP The tunnel can be set or directly used as a node IP Or node domain name
First log in to the domain name registrar , Find the modification DNS The place of analysis . Here to Godaddy For example , Because the user interfaces of various registrants are quite different , We can't enumerate . If you can't find it, you can call and ask Registrant Customer service or online search .
 Insert picture description here
Then go to the tunnel list to find the node domain name , And confirm your subdomain name . The subdomain name here is www, If you use the root domain name directly example.com, Just treat the subdomain name as empty .

 Insert picture description here
Next, you can set the resolution , Refer to the figure and fill in , The user interface of each registrar is different , But these are basically the things that need to be filled in to set the resolution .

 Insert picture description here

Keep on record :
Website filing is the website's ICP Abbreviation for filing , Relevant national regulations are as follows :《 Internet Information Services 》 It is pointed out that Internet information services are divided into operational and non operational . The State adopts a licensing system for business Internet information services ; For non operating Internet information services, the filing system shall be implemented . Failing to obtain permission or fulfill the filing formalities , Do not engage in Internet information services .

Generally speaking , Filing refers to the filing of domain names , Not the server . Whether a website has been put on record , It depends on whether the space used by the website is domestic or foreign .
If it is a domestic host , The website domain name needs to be filed , To access your website through the domain name .
If it is a foreign host , The website domain name is not required to be filed , You can also access through the domain name .

Be careful : You need to purchase at alicloud 3 Only servers older than months can apply for filing (ECS Servers in ECs that are paid by volume cannot apply for filing ).

原网站

版权声明
本文为[m0_ fifty-five million six hundred and seventy-five thousand ei]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120409335578.html