Rds proxy fixes

Fixes to make running the database on another host actually work. Also added settings and logic to make running the entire application behind a reverse proxy work correctly.