Thanks, ive already used this resources trying the below but it doesnt make a difference, the rails static page is still being served. I think maybe i need to disable that first, thanks for your help.
error_page 404 =301 http://example.com/notfound.html;
error_page 404 =301 http://example.com/notfound.html;