A PHP script to proxy ACME challenge validation requests towards multiple backend server, based on the hosts local DNS results
Switch branches/tags
Nothing to show
Clone or download
Latest commit 642d064 Nov 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Nov 13, 2018
README.md Update README.md Nov 15, 2018
acme_proxy.php Bump to version 1.0.0 Nov 15, 2018

README.md

acme_proxy.php

A PHP script to proxy ACME challenge validation requests towards multiple backend servers, based on the hosts local DNS results.

NGINX configuration

This is an example to enable the proxy on NGINX:

server {
  listen  80 default_server;
  listen  [::]:80 default_server;
  server_name localhost;

  location  /.well-known/acme-challenge/ {
    root /var/www;
    autoindex off;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include        fastcgi_params;
    fastcgi_param  ACME_DST_PORT 80;
    fastcgi_param  ACME_TLS false;
    fastcgi_param  ACME_TLS_VERIFY true;
    fastcgi_param  ACME_DOMAINS .example.com,.example.net;
    #fastcgi_param  ACME_DNS_SERVERS 192.168.0.1,192.168.0.2;
    #fastcgi_param  ACME_DNS_PORT 53;
    fastcgi_intercept_errors off;
    fastcgi_pass  unix:/var/run/php-www.socket;
    fastcgi_param  SCRIPT_FILENAME $document_root/acme_proxy.php;
  }
}

Using custom DNS resolver

This will require to install Net_DNS2.