3

I'm trying to convert this nginx configuration block to Apache 2.4:

http {
...
server {
...
  location ~ ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$ {
    default_type text/plain;
    return 200 "$1.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd";
  }
...
}
}

What I have at this moment is:

<LocationMatch ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$>
RewriteEngine On
RewriteRule ^/.*/$ $1.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd [R=200]
</LocationMatch>

But it's definitely not working.

What I'm trying to achieve? Let's Encrypt stateless mode with Apache: https://github.com/Neilpang/acme.sh/wiki/Stateless-Mode

Vinícius Ferrão
  • 5,520
  • 11
  • 55
  • 95

0 Answers0