summaryrefslogtreecommitdiff
path: root/etc/nginx/sites-enabled/shop-demo-ssl.site
diff options
context:
space:
mode:
Diffstat (limited to 'etc/nginx/sites-enabled/shop-demo-ssl.site')
-rw-r--r--etc/nginx/sites-enabled/shop-demo-ssl.site54
1 files changed, 54 insertions, 0 deletions
diff --git a/etc/nginx/sites-enabled/shop-demo-ssl.site b/etc/nginx/sites-enabled/shop-demo-ssl.site
new file mode 100644
index 0000000..8d34446
--- /dev/null
+++ b/etc/nginx/sites-enabled/shop-demo-ssl.site
@@ -0,0 +1,54 @@
+server {
+ listen 443 ssl; ## listen for ipv4; this line is default and implied
+ # listen [::]:80 default_server ipv6only=on; ## listen for ipv6
+
+ server_name shop.demo.taler.net;
+ ssl_certificate /etc/letsencrypt/live/taler.net/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/taler.net/privkey.pem;
+ ssl_prefer_server_ciphers on;
+ ssl_session_cache shared:SSL:10m;
+ ssl_dhparam /etc/ssl/certs/dhparam.pem;
+ ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
+ ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
+
+ add_header Strict-Transport-Security "max-age=63072000; preload";
+
+ root /home/demo/merchant/examples/shop/;
+ index index.php;
+
+ # Make site accessible from http://localhost/
+
+ location / {
+ try_files $uri $uri/ =404;
+ rewrite /taler/pay /pay.php;
+ rewrite /taler/contract /generate_taler_contract.php;
+
+ }
+
+ location /fullfillment {
+ rewrite /(.*) /$1.php;
+ }
+
+ location /test/contract {
+ rewrite (.*) /generate_taler_contract.php?cli_debug=yes;
+ }
+
+ location /test/contract/frontend {
+ rewrite (.*) /generate_taler_contract.php?backend_test=no;
+ }
+
+ location ~ \.php$ {
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+
+ location /backend {
+ rewrite /backend/(.*) /$1 break;
+ proxy_pass http://127.0.0.1:9966;
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ }
+
+ rewrite ^/shop $scheme://shop.demo.taler.net/ redirect;
+}