diff --git a/Stateless-Mode.md b/Stateless-Mode.md index 600b9f1..4edf542 100644 --- a/Stateless-Mode.md +++ b/Stateless-Mode.md @@ -40,37 +40,25 @@ Configure your webserver to respond statelessly to challenges for a given accoun respond @achallenge "{re.ch.1}.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd" ``` ### APACHE + + _Tested on Apache 2.4.61_ + Add something similar to your `httpd.conf`: ```apache - LoadModule php7_module libexec/apache2/libphp7.so ... - ... - - AddType application/x-httpd-php .php - AddType application/x-httpd-php-source .phps - - DirectoryIndex index.html index.php - - ... RewriteEngine On - RewriteRule "^[-_a-zA-Z0-9]+$" "index.php" + RewriteRule "^([-_a-zA-Z0-9]+)$" "$1" [E=challenge:$1] + ErrorDocument 200 "%{ENV:challenge}.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd" + RewriteRule ^ - [L,R=200] ... ... ``` - Then add `/PATH/TO/WWW/ROOT/.well-known/acme-challenge/index.php`: - ```php - - ``` - _NOTE that this approach uses PHP but something similar could be done with CGI, Perl, Ruby or pretty much any other server-side language._ + ### HAPROXY Add the http-request return rule to your configuration: ```haproxy