Your comments

In this case you don't need to go through the trouble of compiling. On any debian based os (Ubuntu for example), try running "sudo apt-get install nginx-extras". Restart nginx and the module is loaded :P

I found the easiest way was to install my module was using the nginx-extras package. According to this document the realip module is also in there :)