background

As a full-stack front-end, you need to have a basic knowledge of how to support normal access and troubleshoot problems after application deployment.

Application startup

When using pM2 or a similar tool, you can start the application and check the status of the application. If the application is online, you can also check the output of logs.

In normal cases, run the netstat -lntp command to check whether the services running on the local server contain the verified application.

You can also view the returned content of the service directly using curl Adress

Exposed ports and IP addresses

First, ensure that the address used by the application is identified by the server, such as localhost 0.0.0.0 127.0.0.1, which is identified by the server.

If a container similar to Docker is used, the internal port and external port should be specified in association, and relevant port exposure configuration should be added to the server. (Pay attention to the distinction between the Intranet address and the Extranet address. The Extranet address is the address accessible to the outside world. The Intranet address can be accessed only when it is connected to the VPN or on the same Intranet.)

Domain name to

Generally, we do application access through domain names, so it is also basic common sense to add domain name resolution to the specified server + port, we can judge this point by the domain name resolution result returned by the browser is not our specified IP address.

In addition, the domain name points to a certain situation, there is also a cache, see the specific service provider related instructions.

On the client side, the domain name part also has related cache, so the following suggestions are given for this:

  1. Minimize the change of domain names pointing to servers
  2. When identifying a problem, first identify the specific server to which the user access is assigned
  3. There are available solutions. How can I guide users to clear the domain name cache

The technical solutions used by the domain name pointing service also have an impact on the results. For example, using Nginx for secondary domain name forwarding is different from using the domain name resolution provided by cloud service providers. The two principles are different and the results may be different. (In the recent case of nuXT server deployment, nginx is used for domain name resolution to forward the back-end domain name of the test server, while cloud service is used for production service, domain name forwarding is disabled, and IP direct access can be forwarded)

Domain name forward

Generally, applications process all data internally and request it internally, but there are cases where it needs to be forwarded to other domain services.

For example, in the following two cases:

  1. This application is only an application end and requires the interface to forward the data to the back-end gateway
  2. The interface service is provided by the external environment and is forwarded by domain name

In both cases, make sure

  1. Correct forwarding address
  2. IP address access is correctly forwarded
  3. Domain name access in case of correct forwarding