some misc cleanup and nginx changes for phalcon framework