XOR Media

Coding, Operations, Etc.

Django ALLOWED_HOSTS and Amazon Elastic Load Balancer

A recent Django security release added a new configuration option, ALLOWED_HOSTS. It's optional in 1.3 and 1.4, but required in 1.5 setups. The relevant detail is that when enabled in production Django will throw 500 errors if the Host header doesn't match one of the ...

(more)
In ops, tagged: aws, django, elb, and python.

Gunicorn, HTTPS, and Amazon Elastic Load Balancer

If you're looking to serve both HTTP and HTTPS out of EC2 from python, using gunicorn and ELB you'll need to add a bit of configuration to get gunicorn to correctly detect which scheme the original request was made with and thus allow Django (or whatever framework you ...

(more)
In ops, tagged: python, aws, and elb.