From: Raphaƫl Gertz Date: Thu, 29 Sep 2016 12:48:22 +0000 (+0200) Subject: Final bin files X-Git-Tag: 2.0.3~38 X-Git-Url: https://git.rapsys.eu/acme/commitdiff_plain/8232cc7e880b10720e10a634f70fbc1578960bff Final bin files Add missing ignore Add configuration script --- diff --git a/.gitignore b/.gitignore index d5a36f6..9d90f66 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ cert key pending +.*~ +*~ diff --git a/gencert b/letscert similarity index 100% rename from gencert rename to letscert diff --git a/letsconf b/letsconf new file mode 100755 index 0000000..9f3d9f1 --- /dev/null +++ b/letsconf @@ -0,0 +1,91 @@ +#! /usr/bin/php + '/etc/pki/tls/certs/httpd.pem', + // Private key + //XXX: required + 'key' => '/etc/pki/tls/private/httpd.pem', + // Mail address + //XXX: required + 'mail' => 'example@example.com', + // Domain list + //XXX: required + 'domains' => array( + 'www.example.com', + 'example.com' + ), + // Production certificate + //XXX: optional + //XXX: set to 1 for production + 'prod' => 0 + ), + // Other certificate + array( + 'cert' => '/etc/ssl/certs/apache.crt', + 'key' => '/etc/ssl/private/apache.key', + 'mail' => 'example@example.com', + 'domains' => array( + 'other.example.com', + 'example.com' + ), + 'prod' => 0 + ), + #... + ) +); + +# Send to stdout +if ($argv[1] == '-') { + echo $config; +# Save to file +} else { + file_put_contents($argv[1], $config); +} diff --git a/www/acme.conf b/www/acme.conf new file mode 100644 index 0000000..fbb7772 --- /dev/null +++ b/www/acme.conf @@ -0,0 +1,22 @@ +# Acme configuration + + # Ignore htaccess + AllowOverride None + + # Allow follow symlinks (required by php or rewrite) + Options FollowSymLinks + + # Allow from all + Require all granted + + + + # Start rewrite engine + RewriteEngine on + + # Only if https is disabled + RewriteCond %{HTTPS} off + + # Rewrite acme uri on php script + RewriteRule /\.well\-known/acme\-challenge/([-_a-zA-Z0-9]+) /var/www/acme/acme-challenge.php?key=$1 [L] + diff --git a/www/example.com.conf b/www/example.com.conf new file mode 100644 index 0000000..ce8747b --- /dev/null +++ b/www/example.com.conf @@ -0,0 +1,20 @@ +# Virtual host configuration + + # Set server name + ServerName example.com + + # If rewrite module is available (or ) + + # Start rewrite engine + RewriteEngine on + + # Inherit acme.conf rules + RewriteOptions InheritBefore + + # Force redirection on https version + ## Only if https is disabled + ##RewriteCond %{HTTPS} off + ## Rewrite acme uri on php script + ##RewriteRule (/.*) https://%{SERVER_NAME}$1 [R=301,L] + +