Skip to content

Instantly share code, notes, and snippets.

@fboaventura
Last active December 22, 2017 15:39
Show Gist options
  • Save fboaventura/fc0e113d63d6de625eff37b2b476dd5e to your computer and use it in GitHub Desktop.
Save fboaventura/fc0e113d63d6de625eff37b2b476dd5e to your computer and use it in GitHub Desktop.
Apache: Redirect all Let's Encrypt challenges to a single document root
<IfModule mod_proxy.c>
ProxyPass /.well-known/acme-challenge !
</IfModule>
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
<Directory "/var/www/html/.well-known/acme-challenge">
Options None
AllowOverride None
AddDefaultCharset off
# Apache 2.4
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order Allow,Deny
Allow from all
</IfModule>
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment