some nginx stuff, misc fixes