Nginx page in docker, windows access 200, linux access 301 What is this

  docker, question

The nginx page in docker, windows access 200, linux access 301. What is this situation (nginx and docker related configurations are attached below)
Host ip 192.168.251.172

Windows access
图片描述

Linux access
图片描述

Nginx access log
图片描述

Nginx plus configuration

location /test {
 #root   /usr/share/nginx/html;
 root   /opt/hsq/;
 index   index.html  index.htm ;
 }

Docker container details

[
    {
        "Id": "4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46",
        "Created": "2018-06-11T03:00:09.642318467Z",
        "Path": "/bin/bash",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 22892,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-06-11T03:00:10.487932071Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:cd5239a0906a6ccf0562354852fae04bc5b52d72a2aff9a871ddb6bd57553569",
        "ResolvConfPath": "/var/lib/docker/containers/4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46/hostname",
        "HostsPath": "/var/lib/docker/containers/4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46/hosts",
        "LogPath": "/var/lib/docker/containers/4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46/4881ad1456bc68b1972c2f17443fa2a25abaa0c2470757cefc475cee2afdfa46-json.log",
        "Name": "/web1",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/opt/hsq/nginx:/etc/nginx",
                "/opt/hsq/test/:/opt/hsq/test/"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "80"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/8d6eec1ff1b54e0fdb18149e653d7233b6c8f430ed31a4af352cbbcd1b5a8a13-init/diff:/var/lib/docker/overlay2/c7375eaaa06f696804de134dfd9c8df85cb4f6dc48f23b4749cdee5c4ce99f04/diff:/var/lib/docker/overlay2/298a78c1ff783b76ce47bc0911cbc2edbdabcfa018bd394176bbc708efec6380/diff:/var/lib/docker/overlay2/1b4f7f84d028b44aaf902cbe815ad62f5967b0c8e802c8046f454478bc9b6c54/diff",
                "MergedDir": "/var/lib/docker/overlay2/8d6eec1ff1b54e0fdb18149e653d7233b6c8f430ed31a4af352cbbcd1b5a8a13/merged",
                "UpperDir": "/var/lib/docker/overlay2/8d6eec1ff1b54e0fdb18149e653d7233b6c8f430ed31a4af352cbbcd1b5a8a13/diff",
                "WorkDir": "/var/lib/docker/overlay2/8d6eec1ff1b54e0fdb18149e653d7233b6c8f430ed31a4af352cbbcd1b5a8a13/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/opt/hsq/nginx",
                "Destination": "/etc/nginx",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/opt/hsq/test",
                "Destination": "/opt/hsq/test",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "4881ad1456bc",
            "Domainname": "",
            "User": "",
            "AttachStdin": true,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": true,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.15.0-1~stretch",
                "NJS_VERSION=1.15.0.0.2.1-1~stretch"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "Image": "nginx",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
            },
            "StopSignal": "SIGTERM"
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "f7b425debef4a8752fc4f13688054f073dff0ca65320faf3f328fe4f5804f247",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "80"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/f7b425debef4",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "fb6a9bb1e78b71dbfcae2ff8bdafb59a4997bad5cffaed397665ff3f765120e7",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "bf49f453d20badf43be6d756c3b83e844ac1ab0800042e8a681c9b230628f380",
                    "EndpointID": "fb6a9bb1e78b71dbfcae2ff8bdafb59a4997bad5cffaed397665ff3f765120e7",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

When you visit under linux, the url does not add “/”,and you return to 301 and go to the url with bars. This is normal. It is estimated that when you visit the url without bars under windows, you will return to 301. You can see it by looking at the network through chrome’s development tools.