How can I track the transition from one server to another?

On the browser side between the sites and inside the site, I can easily determine this through HTTP REFERER, but between servers without a browser, is it possible to do this?

There are two servers. If you go directly to the second server, it will give out localhost, i.e. will not be available for visiting / viewing / ping and other things. If the second server got through the first server, the server will give the necessary information.

    1 answer 1

    “Got through the first server” - http-proxying is probably meant.

    1. nginx :

      in the nginx configuration, it is possible to allow access only from the ip-address of the first server:

      server { allow ip-адрес-первого-сервера; deny all; ... } 
    2. apache version below 2.4 :

      In the configuration, you can use allow and deny directives:

       <directory ...> order deny,allow deny from all allow from ip-адрес-первого-сервера </directory> 
    3. apache version 2.4 and higher :

      in the configuration of apache version 2.4 and higher, you can use the require directive:

       <directory ...> require ip ip-адрес-первого-сервера </directory> 

      The allow / deny directives from previous versions can also be used, but you cannot mix them with the require directive.

    for ping

    and this is a completely different story, not related to http-servers.