CloudFront as Reverse Proxy Kind of

CloudFront as Reverse Proxy Kind of

Suleman Hasib

--

So I had a Jenkins instance that was hosted on EC2 and I didn’t have any domain to make it HTTPS for webhook purposes. So the solution for me was to set up ELB and then have CloudFront in front of ELB as Reverse Proxy.

ELB: Classic

I set up a simple LoadBalancer type: classic forwarding traffic to port 80 yes my Jenkins has an Nginx in front of it. Since I had no domain so can’t use let’s encrypt with Nginx.

CloudFront

So for CloudFront, I pointed my CloudFront distribution to the load balancer with 2 important configs one for cache and for forwarding show below:

The following two screenshots don’t have any customizations just normal stuff.

These two configs play an important part.

  1. Select All on Cache Based on Selected Request Headers

2. Select Forward all, cache based on all for Query String Forwarding and Caching.

And that’s it this should now work as a reverse proxy for your Jenkins instance.

--

--

Suleman Hasib

I do DevOps. Being an entrepreneur is just the DNA. Oh and a *nix fanboy.