added ubuntu and nginx support, many small fixes