Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Let's Encrypt auto renewal
#8
(06-18-2018, 09:58 PM)ioan Wrote: I found a solution and so far works fine:

Code:
procedure TIWServerController.IWServerControllerBaseNewSession(aSession: TIWApplication);
var
  challengeResponse, challengeFileName: string;
begin
  [...] 
  else if ContainsText(WebApplication.Request.PathInfo, '.well-known/acme-challenge') then
  begin
    // for let's encrypt
    challengeFileName := WebApplication.ApplicationPath + 'wwwroot' + WebApplication.Request.PathInfo.Replace('/', '\');
    if TFile.Exists(challengeFileName) then
      challengeResponse := TFile.ReadAllText(challengeFileName)
    else
      challengeResponse := '';
    WebApplication.Response.WriteString(challengeResponse);
    WebApplication.Terminate;
  end;
end;

It seems that the above solution doesn't work with the latest intraweb version. If I try to request http://localhost/.well-known/acme-challenge/aa, the application never gets in IWServerControllerBaseNewSession and returns a "404 not found" error page.
Reply


Messages In This Thread
Help with Let's Encrypt auto renewal - by ioan - 06-18-2018, 05:48 PM
RE: Help with Let's Encrypt auto renewal - by ioan - 02-04-2019, 06:11 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)