You can compile nginx from sources based in the current nginx binary, with command:
# nginx -V
("V" is uppercase)
From there, you can compile a new binary with exact same parameters, or even with new modules.
The problem would be know what binary version are you using, if upgraded and changed, or not.
If you know what binary version is correct, chack that command.