summaryrefslogtreecommitdiff
path: root/etc/nginx-sites-enabled/bank-test
blob: 2664780396ac6d6489865d61bccf4d2a931432b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
upstream django {
	server 127.0.0.1:8000;
}

server {
	listen   80; ## listen for ipv4; this line is default and implied
 	# 	listen   [::]:80 default_server ipv6only=on; ## listen for ipv6

	root /home/test/bank/website;
        index index.php;

	# Make site accessible from http://localhost/
	server_name bank.test.taler.net;

        location ~ \.php$ {
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }

        location ~ ^/auth/static  {
            rewrite /auth/static/(.*) /static/$1 break;
            uwsgi_pass  django;
            include /home/test/bank/TalerBank/uwsgi_params;

        }

	# Reach Django
	location ~ ^/(auth|admin|static) {
		uwsgi_pass  django;
		include     /home/test/bank/TalerBank/uwsgi_params;
	}

	rewrite ^/shop$ $scheme://shop.test.taler.net/ redirect;
	rewrite ^/mint$ $scheme://mint.demo.taler.net/ redirect;
	rewrite ^/mint/(.*)$ $scheme://mint.demo.taler.net/$1 redirect;
}