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; Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238094,238103#msg-238103