Serving LetsEncrypt HTTP challenge when all http traffic is redirected to https

504 views Asked by At

I want to perform the http validation for LetsEncrypt, which requires http only (port 80). I have a Rails Application running nginx, and has all traffic redirected to HTTPS via the following configuration:

server {
  listen 80;
  listen [::]:80;
  return 301 https://$host$request_uri;
}

my two questions:

  1. Is there a dynamic way (such as an API) to add the file path to my nginx file to serve the challenge file?
  2. Is it possible to serve this challenge file when all traffic is being redirected to https?
0

There are 0 answers