Tag archive for: http proxy settings

Ensuring that your Supervisor subprocesses can run your Python applications properly behind your http proxy on Ubuntu Server 14.0.4

I had been using Supervisor to run my Python application for quite a while on a Ubuntu Server 14.0.4 box.

There was this OAuth feature that I had implemented on my Python Flask application to allow my users to sign in with their social account.

After completing the OAuth feature and ensuring that it worked fine on my development environment, I deployed the feature on my Ubuntu Server 14.0.4 instance.

However, my Python application encountered a HTTP request timeout error when it attempted to contact the OAuth server to authenticate my user login.

It turned out that there was no HTTP and HTTPS proxy settings available for my Python application to use when it tried to contact the OAuth server which is sitting somewhere in the Internet.

This post documents three ways which I had considered for propagating HTTP and HTTPS proxy settings to my Python application via the http_proxy and https_proxy environment variables.