Fixes for nginx
This refs #15  #16