As I said in my comments it probably not possible to remove the file due to the nature of nginx, my suggestion would be using the same approach, but without actually removing the log file. Instead just clear it.
Pseudo Code
file = open "nginx.log", READ
new_file = open tmpname, WRITE
new_file.write file.contents
file.close
new_file.close
sys_command "cat /dev/null > nginx.log"
Or using a script
#!/bin/bash
cp nginx.log nginx.backup.log
cat /dev/null > nginx.log
This way you are not destroying the file and the file handle that nginx has will still be valid.