Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 3
    I'm getting nginx: [emerg] unknown "ip.0" variable Commented Apr 12, 2018 at 14:52
  • 1
    Request : Can you update the regex to handle cases like 9:: , ::9 , 1:2:3:4:5:6:7::, 1::8 Commented Apr 28, 2018 at 4:36
  • "current version of nginx" is as vague as you can be. I have the same issue as @Snowman. Commented May 14, 2018 at 10:05
  • @tolgap Unfortunately neither of you still shared your nginx versions. The map functionality required for my solution to work was added in nginx 1.11. I'll update my answer. At the time of this writing releases tagged 1.12 and below are listed under "Legacy versions" (nginx.org/en/download.html). Commented May 15, 2018 at 10:59
  • 1
    @Medorator try ^(?P<ip>[^:]+(?::[^:]+)?): for all except ::9 Commented May 21, 2018 at 11:34