Add nginx example configuration 1.0.0
authorRaphaël Gertz <git@rapsys.eu>
Tue, 19 Sep 2017 11:45:49 +0000 (13:45 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 19 Sep 2017 11:45:49 +0000 (13:45 +0200)
Rename apache config

www/acme.apache.conf [moved from www/acme.conf with 100% similarity]
www/acme.nginx.conf [new file with mode: 0644]

similarity index 100%
rename from www/acme.conf
rename to www/acme.apache.conf
diff --git a/www/acme.nginx.conf b/www/acme.nginx.conf
new file mode 100644 (file)
index 0000000..4d807d1
--- /dev/null
@@ -0,0 +1,19 @@
+server {
+        listen          80;
+        server_name     example.com;
+
+        root /usr/share/acme;
+
+        location ~ ^/.well-known/acme-challenge {
+                rewrite ^/.well-known/acme-challenge/(.*)$ /acme-challenge.php?key=$1 last;
+        }
+
+        location ~ ^/acme-challenge\.php$ {
+                fastcgi_pass unix:/tmp/php5-fpm.sock;
+                include fastcgi_params;
+        }
+
+        location / {
+                return 301 https://$server_name$request_uri;
+        }
+}