A brief explanation of the server

Simple understanding of the server

  • We often use the database when we develop
  • But you can never throw the database directly on the user's computer
  • One is too big, the other is insecure
  • So we have to put the database on the network from the other end (remote)
  • Therefore, when front-end personnel request data from back-end personnel, the network is required
  • It is impossible for us to put the page on the user’s computer
  • So users also need the network to request pages from front-end personnel

Server awareness

  • We have some common servers in the market that can host content
  • At present, the more commonly used is ApacheandTocat
  • The Apacheserver is explained here
  • It is phpa server that cooperates closely with the language

What is a server?

  • In fact, to put it bluntly, a server is a computer. When it runs some programs, it becomes a server.
  • It’s just that you can run some special programs and need some special environment. The computer looks different from his.
  • In other words, our own computer can also be used as a small server when running some special programs.
  • It's just computing power, storage capacity, and transfer capacity. There is no professional server computer.

Server access method

  • Related to urlsome content in our address
  • Such as our frequently visitedwww.baidu.com
  • What we see is just an omitted content
  • It’s the browser that helped us omit some content
  • All addresses should be:https://www.baidu.com:443
  • Did you find two more things: https://and:433
  • In fact, a simple urladdress is composed of three parts
    1. Transfer Protocol
    2. domain name
    3. The port number

Transfer Protocol

  • Our common transmission protocol is httpandhttps
  • They are the methods and rules that restrict the communication and transmission of data between the user and the server
  • It is also the rule of interaction between our front-end and back-end personnel
  • rule:
    1. Establish a connection channel
    2. Mutual communication
    3. Close the connection channel
  • http: Is a common protocol, not very secure
  • https: Is an encrypted transmission protocol, relatively safer

domain name

  • As we said before, the server is a computer on the other end of the network
  • In the past, there was no concept of a domain name, everyone used IPaddresses to access
  • That 网络那一头is the computerIP
  • For example:, 30.36.136.76is a bunch of numbers, not easy to remember
  • There is a World Wide Web at the back , which iPmatches each address with an English name, which is convenient for users to remember
  • So, on behalf of the domain name that a network that the computer's IPaddress
  • In fact, which server we want to visit

The port number

  • Other people’s server computers also have a lot of folders
  • Different content is stored in different folders
  • There may be a folder, which stores the homepage
  • There may be a folder b, which stores some data
  • So, you can’t just find the server computer, you have to find the right folder.
  • Everyone numbered the folders and stored a 0-255total of 256 folders
  • There are 0-255also 256 corresponding small folders in each folder
  • Then there is 256*256a folder in total , which is from0-65535
  • So we have one port number 65536, which corresponds to0-65535
  • Everyone regards the 80port number as the default port number for a total of websites
  • The http protocol defaults to port 80
  • The HTTPS protocol defaults to port 443

Look at Baidu again

  • Up to now, we are looking at the full url address of Baidu
  • https://www.baidu.com:443
    1. Communicate with an encrypted transmission protocol
    2. Access is on the network IPvalue of 119.75.217.109that computer
    3. The visit is the first 443document folder
  • This folder stores a Baidu page
  • We can see this page when we open it

Guess you like

Origin blog.csdn.net/qq_45677671/article/details/113729744