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

At that time, use the URL of "" for the environment of "",
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. aaa

Use the URL of "http: // aaa/~" for the environment of "",
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.


  • 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 is received once and it is skipped to,
    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