mirror of
https://github.com/ridercz/AutoACME.git
synced 2026-04-25 07:05:55 +03:00
[GH-ISSUE #6] Error 404 when trying to open the acme challenge url #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AutoACME#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @petrnejedly on GitHub (Jan 14, 2018).
Original GitHub issue: https://github.com/ridercz/AutoACME/issues/6
Hi,
Let's say I own a domain "site.eu". In my IIS there are (among others) two separate WebSites:
The www directory is the root directory of my website. The nowww directory contains only a Web.Config file managing 301 redirects from no-www to www (
<httpRedirect enabled="true" destination="https://www.site.eu" httpResponseStatus="Permanent" />). The site already uses a paid SSL certificate and I want to switch to Let's encrypt now.Bindigs are set as follows:
When I try to request for a new certificate file (
autoacme addhost www.site.eu) for the first time, the attempt to open an url address http://www.site.eu/.well-known/acme-challenge/ ends up with an error 404. I think that the url http://www.site.eu/.well-known/acme-challenge/ redirects to https://www.site.eu/.well-known/acme-challenge/ and now the error 404 occurs. I think the request does not go through the Url Rewrite module in IIS at this case.Is there anything I can do to make it work in this scenario?
@ridercz commented on GitHub (Jan 14, 2018):
Your setup is quite unusual and I believe also needlessly complicated.
HTTP-01 challenge follows redirects. I believe you are redirecting to wrong address, ie. you are always redirecting to root URL, not the URL that was asked for.
I recommend you to create single site, which would have four bindings:
http://www.site.eu/http://site.eu/https://www.site.euhttps://site.eu/Then use URL rewriting to redirect to the canonical address (
www.site.eu) and HTTPS:This redirect will retain the part of URL after host name and therefore everything will work correctly. AutoACME will then be able to get certs for both
site.euandwww.site.eu.