Currently, we launched an Apache server from XAMPP and created an environment where the server can be accessed with the following URL.

http: // localhost: Port number/Folder name/File name

The above URL can be changed to the following URL

http: //127.x.x.x: 8080/Folder name/

This number is listed in the hosts file.

Why can't I change 127.x.x.x to an ip address?
The following is the result of running ipconfig from a windows cmd in an in-house environment.

Ethernet adapter Ethernet:

Connection-specific DNS suffix ... Company name.co.jp
Link-local IPv6 address ... hex value
IPv4 address ...
Subnet mask ... 255: 255.255.0
Default gateway ... xxx.xxx.xx.x

I know my IP address = my PC
The URL has been changed as follows. name/

Why can't I access this?

I wonder if there is no problem with the IP address to be referenced on Ethernet.

Is my recognition wrong?
If so, what is the difference between the hosts file number and the IP address?

  • Answer # 1


    The following is the flow to resolution.

    With the Apache server running

    Access with your own IP address
    http;// → Successful access

    can't be accessed with Ipv4→Successfully accessed
    * At the time of the question, connection failure due to typo

    Don't notice this typo
    asahina19179 is is global, so can you access it? And give a hint
    I received it, but it was local because it was Ethernet, and the above URL access was successful

  • Answer # 2

    If I wrote the definition of BindAddress in httpd.conf,
    You can specify an IP address that can receive requests, so
    There is a possibility of such a case, but
    Security software and firewall software that is simply in your computer,
    It seems that it is only blocking access to the external IP address