merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit ad033e20c2b9c2c8fe5678393917d5a463c59b81
parent 5eac4e76af3c5aea686213854e08c0753f92d523
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Mon, 25 Jul 2016 18:33:39 +0200

Adding nginx example file. See sections under
comment #4456 to see how to make PHP handle images requests

Diffstat:
Aexamples/blog/data/nginx.conf | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/examples/blog/data/nginx.conf b/examples/blog/data/nginx.conf @@ -0,0 +1,50 @@ +server { + listen 80; + listen [::]:80; + + server_name blog; + + ssi on; + root /home/marcello/merchant/examples/blog; + index index.html; + + location / { + try_files $uri $uri/ =404; + rewrite /taler/pay /pay.php; + rewrite /taler/contract /generate_taler_contract.php; + + } + + # #4456 + location ~ ^/data/([^/]+)/([^/]+)\.(jpg|png|gif|jpe?g)$ { + rewrite ^/data/([^/]+)/([^/]+)\.(jpg|png|gif|jpe?g)$ /images.php?article=$1&image=$2.$3; + } + + location ~ \.php$ { + + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location /fullfillment { + + rewrite /(.*) /$1.php; + } + + location /articles { + internal; + } + + # #4456 + location /data { + internal; + } + location /backend { + rewrite /backend/(.*) /$1 break; + proxy_pass http://127.0.0.1:9966; + proxy_redirect off; + proxy_set_header Host $host; + + } +}