commit 844f47bce38cabcc9d8999134c7b26467ef80b79
parent bb8c31119d12a297f42016dd611e8385d5a17839
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Mon, 18 Apr 2016 09:53:27 +0200
moving frontend instructions in respective directory
Diffstat:
6 files changed, 128 insertions(+), 58 deletions(-)
diff --git a/examples/INSTALL b/examples/INSTALL
@@ -1,20 +0,0 @@
-
-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/blog/README b/examples/blog/README
@@ -0,0 +1,21 @@
+
+This guide is for running the 'blog' example, which require PHP and is
+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 (nginx_example.conf)
+in this directory
diff --git a/examples/blog/nginx_example.conf b/examples/blog/nginx_example.conf
@@ -0,0 +1,40 @@
+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;
+
+ # WARNING the 'blog' directory can't be freely moved in your filesystem
+ # because it includes some PHP files via relative path (../../copylib)
+ root /path/to/merchant/examples/blog;
+ 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;
+ }
+
+}
diff --git a/examples/nginx_example.conf b/examples/nginx_example.conf
@@ -1,38 +0,0 @@
-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;
- }
-
-}
diff --git a/examples/shop/README b/examples/shop/README
@@ -1,3 +1,30 @@
+INSTALL
+=======
+
+This guide is for running the 'shop' example, which require PHP and is
+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 (nginx_example.conf)
+in this directory
+
+FILES
+=====
+
This directory contains the files implementing the frontend of the new merchant architecture.
Only tested on nginx. To run the website, it suffices to have all the .php and .html files
diff --git a/examples/shop/nginx_example.conf b/examples/shop/nginx_example.conf
@@ -0,0 +1,40 @@
+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;
+
+ # WARNING the 'shop' directory can't be freely moved in your filesystem
+ # because it includes some PHP files via relative path (../../copylib)
+ 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;
+ }
+
+}