I want to install https on my site on windows 7, apache2.4. I found this tutorial and get an issue.
terminal log
`$ C:\win-acme.v1.9.11.2\letsencrypt.exe --manualhost mysite.com --webroot "C:\Apache24\htdocs" --test --verb
ose
[DBUG] Test parameter set: https://acme-staging.api.letsencrypt.org/
[DBUG] Config folder: C:\ProgramData\win-acme\httpsacme-staging.api.letsencrypt.org
[VERB] Settings SettingsService {ConfigPath="C:\ProgramData\win-acme\httpsacme-staging.api.letsencrypt.or
g", ClientNames=["win-acme", "letsencrypt-win-simple"], RenewalDays=55, HostsPerPage=50, ScheduledTaskRandomD
elay=00:00:00, ScheduledTaskStartBoundary=09:00:00, ScheduledTaskExecutionTimeLimit=02:00:00}
[VERB] .NET Framework 4.6.1 detected
[INFO] A Simple ACME Client for Windows (WACS)
[INFO] Software version 1911.2.6726.40690 (RELEASE)
[INFO] IIS version 7.5
[INFO] ACME server https://acme-staging.api.letsencrypt.org/
[INFO] Please report issues at https://github.com/PKISharp/win-acme
[VERB] Verbose mode logging enabled
[DBUG] Renewal period: 55 days
[VERB] Store renewals in file C:\ProgramData\win-acme\httpsacme-staging.api.letsencrypt.org\Renewals
N: Create new certificate
M: Create new certificate with advanced options
L: List scheduled renewals
R: Renew scheduled
S: Renew specific
A: Renew all
V: Revoke certificate
C: Cancel scheduled renewal
X: Cancel all scheduled renewals
Q: Quit
Please choose from the menu: n
[INFO] Running in Simple mode
1: Single binding of an IIS site
2: SAN certificate for all bindings of an IIS site
3: SAN certificate for all bindings of multiple IIS sites
4: Manually input host names
C: Cancel
Which kind of certificate would you like to create?: 4
Enter comma-separated list of host names, starting with the primary one: mysite.com
[INFO] Plugin Manual generated target [Manual] [1 binding - mysite.com]
1: Default Web Site
Choose site to create new bindings: 1
[DBUG] Loading signer from C:\ProgramData\win-acme\httpsacme-staging.api.letsencrypt.org\Signer
[DBUG] Getting AcmeServerDirectory
[DBUG] Send GET request to https://acme-staging.api.letsencrypt.org/directory
[DBUG] Loading registration from C:\ProgramData\win-acme\httpsacme-staging.api.letsencrypt.org\Registration
[INFO] Authorize identifier: mysite.com
[DBUG] Send POST request to https://acme-staging.api.letsencrypt.org/acme/new-authz
[EROR] Unable to activate HttpListener, this may be due to non-Microsoft webserver using port 80
[EROR] Error resolving validation plugin
Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registrat
ion. See the inner exception for details. Registration: Autofac.Core.Registration.ComponentRegistrationLifeti
meDecorator ---> An error occurred during the activation of a particular registration. See the inner exceptio
n for details. Registration: Activator = SelfHosting (DelegateActivator), Services = [PKISharp.WACS.Plugins.V
alidationPlugins.Http.SelfHosting], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ow
nership = ExternallyOwned ---> An error occurred during the activation of a particular registration. See the
inner exception for details. Registration: Activator = SelfHosting (ReflectionActivator), Services = [PKIShar
p.WACS.Plugins.ValidationPlugins.Http.SelfHosting], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sh
aring = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'V
oid .ctor(PKISharp.WACS.ScheduledRenewal, PKISharp.WACS.Target, System.String, PKISharp.WACS.Services.ILogSer
vice, PKISharp.WACS.Services.IInputService, PKISharp.WACS.Services.ProxyService)' on type 'SelfHosting'. --->
The process cannot access the file because it is being used by another process (See inner exception for deta
ils.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.
) ---> Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular re
gistration. See the inner exception for details. Registration: Activator = SelfHosting (DelegateActivator), S
ervices = [PKISharp.WACS.Plugins.ValidationPlugins.Http.SelfHosting], Lifetime = Autofac.Core.Lifetime.Curren
tScopeLifetime, Sharing = None, Ownership = ExternallyOwned ---> An error occurred during the activation of a
particular registration. See the inner exception for details. Registration: Activator = SelfHosting (Reflect
ionActivator), Services = [PKISharp.WACS.Plugins.ValidationPlugins.Http.SelfHosting], Lifetime = Autofac.Core
.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown
while invoking the constructor 'Void .ctor(PKISharp.WACS.ScheduledRenewal, PKISharp.WACS.Target, System.Stri
ng, PKISharp.WACS.Services.ILogService, PKISharp.WACS.Services.IInputService, PKISharp.WACS.Services.ProxySer
vice)' on type 'SelfHosting'. ---> The process cannot access the file because it is being used by another pro
cess (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)
---> Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular reg
istration. See the inner exception for details. Registration: Activator = SelfHosting (ReflectionActivator),
Services = [PKISharp.WACS.Plugins.ValidationPlugins.Http.SelfHosting], Lifetime = Autofac.Core.Lifetime.Curre
ntScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking
the constructor 'Void .ctor(PKISharp.WACS.ScheduledRenewal, PKISharp.WACS.Target, System.String, PKISharp.WA
CS.Services.ILogService, PKISharp.WACS.Services.IInputService, PKISharp.WACS.Services.ProxyService)' on type
'SelfHosting'. ---> The process cannot access the file because it is being used by another process (See inner
exception for details.) (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException:
An exception was thrown while invoking the constructor 'Void .ctor(PKISharp.WACS.ScheduledRenewal, PKISharp.W
ACS.Target, System.String, PKISharp.WACS.Services.ILogService, PKISharp.WACS.Services.IInputService, PKISharp
.WACS.Services.ProxyService)' on type 'SelfHosting'. ---> The process cannot access the file because it is be
ing used by another process (See inner exception for details.) ---> System.Net.HttpListenerException: The pro
cess cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at PKISharp.WACS.Plugins.ValidationPlugins.Http.SelfHosting..ctor(ScheduledRenewal renewal, Target target,
String identifier, ILogService log, IInputService input, ProxyService proxy)
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
--- End of inner exception stack trace ---
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnu
merable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope
, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumera
ble1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope
, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 p
arameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, Parameter[] parameter
s)
at PKISharp.WACS.AutofacBuilder.<>c__DisplayClass2_0.
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass0_01.<ForDelegate>b__0(IComponentContext c, IEnum
erable1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumera
ble1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func1 creator)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope
, IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 para
meters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 p
arameters)
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable1 parameters)
at PKISharp.WACS.Program.Authorize(ILifetimeScope renewalScope, Target target)
[EROR] Validation plugin not found or not created.
[EROR] Create certificate failed
apache virtual conf
<VirtualHost *:80>
ServerName mysite.com
Alias /.well-known "C:/Apache24/htdocs/.well-known"
ServerAlias www.mysite.com
##Redirect permanent / https://mysite.com/
WSGIScriptAlias / C:\mysite\run.wsgi
<Directory "C:\mysite">
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
Require all granted
</Directory>
ErrorLog "logs/mysite-error.log"
CustomLog "logs/mysite-access.log" common
</VirtualHost>
The default validation method (SelfHosting) doesn't work when Apache is running, you have use advanced mode and choose FileSystem validation.
Most helpful comment
The default validation method (SelfHosting) doesn't work when Apache is running, you have use advanced mode and choose FileSystem validation.