Getting around apache configs with 443 redirects

Hello.

All the domains we have are set up with redirects from :80 to :443. This is causing issue with renew:

<VirtualHost *:80>
    ServerName myhost.mydomain.com
    Redirect / https://myhost.mydomain.com
</VirtualHost>

<VirtualHost *:443>
  ...
</VirtualHost>

What I’d prefer to do is have maybe a different, shared directory outside of our main web data directory where LE would save it’s challenge. Does anyone have a workaround for this? I was thinking maybe as Alias directive?

Redirects should normally work fine. You do need the slash at the end though, if you’re using the webroot method:

     Redirect / https://myhost.mydomain.com/

You can use an Alias for redirecting all challenges to a single location, yes. Something like …

Alias /.well-known/acme-challenge /your/challenge/directory
<Directory /your/challenge/directory>
	Require all granted
</Directory>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.