commit bb8c31119d12a297f42016dd611e8385d5a17839
parent f9441ca8541756e454a6560f8f7dc11afd8b300c
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Mon, 18 Apr 2016 09:41:43 +0200
instructions for running the frontend
Diffstat:
2 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/examples/INSTALL b/examples/INSTALL
@@ -0,0 +1,20 @@
+
+This guide is for running the 'blog' and 'shop' examples,
+which require PHP and are served via nginx.
+
+Assuming that your system has a working PHP, the following
+pecl packages are needed (the preferred way to install them
+is with the pecl package manager, and not via your distribution's):
+
+pecl_http
+propro
+raphf
+
+As for the versioning, our working setup is using:
+
+PHP 5.6
+pecl_http 2.4.3 stable
+propro 1.0.0 stable
+raphf 1.1.0 stable
+
+You can now refer to the nginx configuration examples in this directory
diff --git a/examples/nginx_example.conf b/examples/nginx_example.conf
@@ -0,0 +1,38 @@
+server {
+ listen 80; ## listen for ipv4; this line is default and implied
+ # listen [::]:80 default_server ipv6only=on; ## listen for ipv6
+ server_name example.com;
+
+ root /path/to/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 ~ \.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:19966;
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ }
+
+}