Coder Social home page Coder Social logo

Comments (9)

Tessando avatar Tessando commented on September 28, 2024

When I setup the Centralized Certificate Settings in IIS, I used the local system's Administrator login and the password. I have verified that this user can gain access to the location where AutoACME is putting the challenge, but for some reason it cannot access it.

I thought this would be permissions based or perhaps networking, but the site comes up both inside a browser on the local machine and outside of the server on my local machine.

Is there anything you can think of that I missed? Why would I be getting that 404 error?

Thank you for your help.

from autoacme.

ridercz avatar ridercz commented on September 28, 2024

Most likely your URL rewriting is configured incorrectly. Try creating file C:\InetPub\wwwroot\AutoAcme\test.txt. It should be reachable as http://scratchpaster.com/.well-known/acme-challenge/test.txt. If it is not, your routing is setup incorrectly.

from autoacme.

Tessando avatar Tessando commented on September 28, 2024

Thank you, I will test this soon. :)

from autoacme.

Tessando avatar Tessando commented on September 28, 2024

Thank you, Michal -

I was able to fix this up by moving the "AutoACME" folder to the root of the scratchpaste_com website. This allowed localhost to resolve and the test TEXT file:

http://scratchpaste.com/.well-known/acme-challenge/test.txt

Here's the error that I'm still getting... hopefully this will provide a little more insight:

C:\CertStore\AutoACME>autoacme addhost scratchpaste.com
Altairis AutoACME Manager version 1.5.4.0
Copyright (c) Michal A. Valasek - Altairis, 2017
www.autoacme.net | www.rider.cz | www.altairis.cz

Reading configuration from 'C:\CertStore\AutoACME\autoacme.json'...OK
Checking host...OK
Requesting cerificate for scratchpaste.com:
  Accepting TOS at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf...OK
  Testing authorization:
    Writing challenge to C:\InetPub\wwwroot\AutoAcme\probe_4c2c8136-f14d-4e02-91fe-e2ec2596bd49...OK
    Testing HTTP challenge:
      Preparing request to http://scratchpaste.com/.well-known/acme-challenge/probe_4c2c8136-f14d-4e02-91fe-e2ec2596bd49...OK
      Getting response...Failed!
      The remote server returned an error: (404) Not Found.
    Testing HTTPS challenge:
      Preparing request to https://scratchpaste.com/.well-known/acme-challenge/probe_4c2c8136-f14d-4e02-91fe-e2ec2596bd49...OK
      Getting response...Failed!
      Unable to connect to the remote server
    Deleting challenge from C:\InetPub\wwwroot\AutoAcme\probe_4c2c8136-f14d-4e02-91fe-e2ec2596bd49...OK
  Request failed: One or more errors occurred.
  Failed!
  Unable to get certificate for new host.

Thanks for your help.

from autoacme.

ridercz avatar ridercz commented on September 28, 2024

The cause is still the same: you have almost certainly invalid setup of the URL rewriting mechanism. You have to rewrite all requests to http://any-site-on-your-server/.well-known/acme-challenge/* to http://localhost/AutoACME/* (if you are following the howto document).

from autoacme.

Tessando avatar Tessando commented on September 28, 2024

Thanks Michal -

Here's a screenshot of how my URL reWriter is setup. Is there anything obvious here that I need to change?

https://futurebohemian.com/github/url-re-writer.png

Thanks!

from autoacme.

ridercz avatar ridercz commented on September 28, 2024

I don't see anything wrong on your screenshot. But according to your previous messages, you have some really weird configuration, not according to the howto document.

You need TWO working web sites:

First, internal web site where http://localhost/AutoAcme/* points to C:\InetPub\wwwroot\AutoACME. So if you'll create C:\InetPub\wwwroot\AutoACME\test.txt, it'll be reachable as http://localhost/AutoAcme/test.txt.

Second, there is the websites you want to protect. They need the rewrite rule, that rewrites http://*/.well-known/acme-challenge/* to http://localhost/AutoAcme/*.

From your messages it seems that you have a single web site and you're trying to get it to rewrite to itself and it's not how it's supposed to work.

If you know what you're doing, you can of course change the urls - use something else instead of localhost and default web site. But then you have to change it everywhere correctly.

from autoacme.

schotman avatar schotman commented on September 28, 2024

I had somewhat the same issue.
If your site is running under IIS and you have the following setting in your web config:
<system.webServer> <modules runAllManagedModulesForAllRequests="true"> .... </modules> </system.webServer>

Alle 404's will be handled by .Net and thus the request will never be processed by IIS, and the default rediect rule will not fire

from autoacme.

ridercz avatar ridercz commented on September 28, 2024

The redirect rule is in no way dependent on 404 error handling.

from autoacme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.