App-Acmeman

 view release on metacpan or  search on metacpan

acmeman  view on Meta::CPAN

       ...

=item 3. Configure haproxy

First, configure the plain HTTP frontend, which will be responsible for
serving ACME challenges and redirecting the rest of the requests to
HTTPS. The simplest definition is:

    frontend http-in
	mode http
	bind :::80 v4v6
	http-request redirect code 301 location https://%[hdr(host)]%[capture.req.uri] unless { path_beg /.well-known/acme-challenge }
	use_backend acme if { path_beg /.well-known/acme-challenge }

Actual backend configuration for the B<acme> backend is beyond the scope of
this manual. Use some simple and lightweight B<http> server capable of serving
static files, such as B<fileserv> (L<https://www.gnu.org.ua/projects/fileserv>),
for example.

Then, configure HTTPS section to use certificates from the certificate file
directory:

    frontend https-in
	mode http
	bind :::443 v4v6 ssl crt /etc/ssl/acme/crt
	# Direct each group of domain names to the corresponding
	# backend.
	use_backend d1 if { hdr(host) -f /etc/haproxy/hosts/d1 }
	use_backend d2 if { hdr(host) -f /etc/haproxy/hosts/d2 }
	...

Finally, define the backends.

=back



( run in 0.686 second using v1.01-cache-2.11-cpan-2398b32b56e )