Home>

For example, suppose you set the following contents in the hosts file.

172.24.11.4 172.24.11.5

At that time, use the URL of "http://172.24.11.5/~" for the environment of "http://172.24.11.4/~",
You need to access the site from a browser.

Although it is

, the contents of the hosts file are not reflected even if the settings are as in the above example.
Therefore, about name resolution of hosts file when IP address is specified for host name,
I would like to know the survey viewpoint and setting method.

For example, if the following contents are set in the hosts file, the name is resolved without any problem.

172.24.11.4 aaa

Use the URL of "http: // aaa/~" for the environment of "http://172.24.11.4/~",
We have confirmed that the site is accessed from a browser.

  • Answer # 1

      

    Resolving hosts file name when IP address is specified for host name

    There is no such function in the hosts file.

    https://linuxjm.osdn.jp/html/LDP_man-pages/man5/hosts.5.html

  • Answer # 2

    We were able to solve the following two patterns.

    1 Using chrome's extension tool "requestly"
    2 Perform nat conversion on the server side

  • Answer # 3

    172.24.11.5 is received once and it is skipped to 172.24.11.4,
    Just use the same public directory.
    (such as sharing with nfs)

    If you want to adjust the base instead of returning the access destination
    There will be no way to handle with the base tag