diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-07-25 18:33:39 +0200 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-07-25 18:33:39 +0200 |
commit | ad033e20c2b9c2c8fe5678393917d5a463c59b81 (patch) | |
tree | c582614b1d5f17a8e68ea04b49b65bded1e0331c | |
parent | 5eac4e76af3c5aea686213854e08c0753f92d523 (diff) | |
download | merchant-ad033e20c2b9c2c8fe5678393917d5a463c59b81.tar.gz merchant-ad033e20c2b9c2c8fe5678393917d5a463c59b81.tar.bz2 merchant-ad033e20c2b9c2c8fe5678393917d5a463c59b81.zip |
Adding nginx example file. See sections under
comment #4456 to see how to make PHP handle images requests
-rw-r--r-- | examples/blog/data/nginx.conf | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/examples/blog/data/nginx.conf b/examples/blog/data/nginx.conf new file mode 100644 index 00000000..be9e22f9 --- /dev/null +++ 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; + + } +} |