Hi,
I know there have been several threads regarding the following question, but I didn’t find an answer that was working for me.
With letsencrypt I have an https rewrite in my apache config followed by a proxy to a container and I don’t get it working to except the /.well-known/acme-challenge directory to get the renew not to be rewritten to https. This is my actual config:
<VirtualHost *:80>
ServerName subdomain.domain.com
Alias /.well-known/acme-challenge/ /var/www/demo/.well-known/acme-challenge/
<Directory "/var/www/demo/.well-known/acme-challenge/">
Options None
AllowOverride None
ForceType text/plain
RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
</Directory>
SSLProxyEngine On
RewriteEngine On
RewriteCond %{REQUEST_URI} !^.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
With this config all requests to subdomain.domain.com are rewritten to https. How can I except /.well-known/acme-challenge from being rewritten to https?
Any help appreciated!
Thx!
Andy