Your comments
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 :)
https://docs.google.com/spreadsheet/ccc?key=0AjuNPnOoex7SdG5fUkhfc3BCSjJQbVVrQTg4UGU2YVE#gid=0
Customer support service by UserEcho
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