don't reinvent the wheel. use nginx as a proxy