Nginx cannot get to client IP?


Page 3 I’m a new user, I can only upload ‘one picture’ ‘two link’ at a time


This is the network details:

Observed result

Get gateway IP

Expected result

Get Client IP

Additional information

Windows 10 1803(17134.112)



Attempt to obtain client IP:



Mode 1


When I use “host” network mode, I don’t know how to access my nginx.
./docker-compose.yml

version: '3.6'

services:
  php:
    image: php:7-fpm
    volumes:
      - ./web:/usr/share/nginx/html
    network_mode: "host"
  nginx:
    image: nginx:1-alpine
    volumes:
      - ./web:/usr/share/nginx/html
      - ./nginx.vh.default.conf:/etc/nginx/conf.d/default.conf:ro
    network_mode: "host"

docker-compose network_mode
ports