Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Nginx module to respond with the public remote IP address
C
tag: v0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
config
ngx_http_remote_ip_module.c

README.md

ngx_remote_ip

This module adds the possibility to respond to a certain URL simply with the remote IP address, e.g.:

# curl http://ip.mydomain.tld/
123.123.123.123

Installation

To include this module in your nginx-installation either do:

./configure --add-module=/path/to/ngx_remote_ip-0.1/

or in Gentoo simple add this to your /etc/make.profile:

NGINX_ADD_MODULES="/path/to/ngx_remote_ip-0.1/"

Configuration

Simply add a new server-declaration:

server {
  listen 80;
  server_name ip.mydomain.tld;
  location / {
    remote_ip;
  }
}

Credits

Thanks to Evan Miller for his guide: http://www.evanmiller.org/nginx-modules-guide.html This module is heavily based upon it.

Something went wrong with that request. Please try again.