Skip to content

Instantly share code, notes, and snippets.

@whitehat101
Last active December 2, 2016 01:00
Show Gist options
  • Save whitehat101/cf1c495e4149f58a7d2ca2079912de61 to your computer and use it in GitHub Desktop.
Save whitehat101/cf1c495e4149f58a7d2ca2079912de61 to your computer and use it in GitHub Desktop.
Acme-http01 with Apache
# mod_rewrite method
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule /\.well-known/acme-challenge/(.+) http://example.com/cert-central/$1 [R=301,L]
</IfModule>
# mod_alias method
<IfModule mod_alias.c>
Alias "/.well-known/acme-challenge" "/var/acme-challenge"
<Directory "/var/acme-challenge">
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow, deny
Allow from all
</IfModule>
ForceType 'text/plain'
</Directory>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment