homestead IP In my homestead guest, my IP is "192.168.10.10".
But on my host, if I print the user IP, I see "192.168.10.1".
Why not 192.168.10.10 ?
"SERVER_ADDR" => "192.168.10.10"
"REMOTE_ADDR" => "192.168.10.1"
Ok, it's "REMOTE_ADDR" that sends the request.
But where can I see "192.168.10.1" in my homestead VM ?
"ip addr" shows of course "192.168.10.10" (the server).
But what about 192.168.10.1 ?
192.168.10.1 is your local IP address of your PC/laptop. The 192.168.10.10 is the IP address of the homestead VM.
"SERVER_ADDR" => "192.168.10.10" //homestead
"REMOTE_ADDR" => "192.168.10.1" //your computer
'REMOTE_ADDR'
The IP address from which the user is viewing the current page.
'SERVER_ADDR'
The IP address of the server under which the current script is executing.
http://php.net/manual/en/reserved.variables.server.php
I see ! Of course, if I query the server from my PC, I'm not homestead ! I'm me. And me = 192.168.10.1. Thanks !
Please sign in or create an account to participate in this conversation.