Home > Common Problem > body text

How to check the port number of a website

步履不停
Release: 2019-06-27 14:47:48
Original
21509 people have browsed it

How to check the port number of a website

Common website ports

The common server software (application) assigned ports are as follows:

FTP: 21

SSH: 22

MYSQL: 3306

DNS: 53

HTTP: 80

POP3: 109

Https: 443

……

Of course, the above can be customized and modified to other port numbers.

1. Ports below 1024 are mostly system ports. For example, port 80 is the default web website access port of the server system. As long as the application does not occupy the port, you can also use port numbers below 1024, but it is recommended not to use port numbers below 1024, especially when using custom port numbers.

2. In theory, port numbers above 1024 can be allocated and used by yourself. For example, you can customize a 2506 port access server for FTP, a 30689 port access server for SSH, etc.

3. In order to ensure the security of the server system, we should reduce the number of open ports. Many useless port numbers are vulnerable to hacker attacks.

[Essential Analysis]

In essence, access to any website is achieved through the combination of the server’s IP (xxx.xxx.xxx) and port number (xx) accessed. Use a: to connect them.

[For example: 119.75.217.109:8080, the complete access is: http://119.75.217.109:8080/. As for the http:// part, if you don’t understand, check the information yourself. 】

【1】, because the IP number of the server is too difficult to remember and unimageable, the so-called "domain name" appeared. The meaning of "domain name" is to represent a certain server IP in the form of a string like xxx.xxx.xx. In essence, they use mapping and binding parsing to process it.

[For example: www.baidu.com (requires special registration and registration, easy to manage, no conflict), when you enter www.baidu.com, it means accessing the server with IP 119.75.217.109. At this time We still don’t know which port we want to access, so let’s talk about ports. 】

【2】, the port is also difficult to remember, which is very annoying. Therefore, for convenience, the port used by the browser to access the website is set to port 80 by default.

It looks like this: http://119.75.217.109:80/

After this rule, everyone uses port 80 as the default. Therefore, all freely accessible websites in the world are basically accessed through port 80 by default.

In this way, since it is already defaulted, why bother writing it out? So, port 80 was directly "omitted". This becomes: http://119.75.217.109/, and finally becomes: http://www.baidu.com/

[3], combining the two points of [1][2], It can be known that when the user enters: www.baidu.com in the browser address bar, the exact process is as follows:

[When ordinary people use it] www.baidu.com =>

[Program processing] http://www.baidu.com/ =>

[Actual access address] http://119.75.217.109:80/

[4], Through the above description, we will easily find that the address looks like this:

http://119.75.217.109:8080/

http://109.105.34.75:2569/admin Addresses such as /

are correct website access addresses.

Note: For a more professional explanation of domain names and ports, please check the relevant information. This is relatively abstract.

This picture shows direct access to Baidu homepage through IP

How to check the port number of a website

Extended part

1, a server Many websites with different domain names can be stored on the Internet, and they can all use the same port 80. They are bound and resolved by different domain names to the same server IP address and in different directories

2. Many secondary websites can be stored on one server. Websites with domain names can all use the same port 80. They are bound by different second-level domain names and resolved to different directories of the same server IP address.

For more technical articles related to frequently asked questions, please visit Learn in the FAQ column!

The above is the detailed content of How to check the port number of a website. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template