demo.site (3614B)
1 server { 2 listen 80; 3 listen [::]:80; 4 server_name demo.taler.net 5 bank.demo.taler.net 6 shop.demo.taler.net 7 donations.demo.taler.net 8 survey.demo.taler.net 9 auditor.demo.taler.net 10 exchange.demo.taler.net; 11 12 # 301-based ridirects allows the user agent to *change* the 13 # method used in the second request. This breaks all the API 14 # using POST, as some user agents do the second request using 15 # GET. 307 is meant to tell the user agent to not change the 16 # method in the second request. 17 if ($request_method = POST) { return 307 https://$host$request_uri; } 18 return 301 https://$host$request_uri; 19 20 } 21 22 23 server { 24 listen 443 ssl; 25 listen [::]:443 ssl; 26 server_name auditor.demo.taler.net; 27 include conf.d/talerssl; 28 location / { 29 rewrite ^/$ /en/ redirect; 30 rewrite ^/(..)/$ /$1/index.html break; 31 recursive_error_pages on; 32 root /home/demo/auditor; 33 } 34 include conf.d/favicon_robots; 35 } 36 37 38 server { 39 listen 443 ssl; 40 listen [::]:443 ssl; 41 server_name demo.taler.net www.demo.taler.net; 42 rewrite /javascript /javascript.html break; 43 include conf.d/talerssl; 44 location / { 45 rewrite ^/$ /en/ redirect; 46 rewrite ^/(..)/$ /$1/index.html break; 47 root /home/demo/landing/demo; 48 } 49 50 include conf.d/favicon_robots; 51 } 52 53 54 server { 55 listen 443 ssl; 56 listen [::]:443 ssl; 57 server_name exchange.demo.taler.net; 58 root /dev/null; 59 include conf.d/talerssl; 60 61 location /admin { 62 proxy_pass http://unix:/home/demo/sockets/exchange-admin.http; 63 proxy_redirect off; 64 proxy_set_header Host $host; 65 } 66 67 location / { 68 proxy_pass http://unix:/home/demo/sockets/exchange.http:/; 69 proxy_redirect off; 70 proxy_set_header Host $host; 71 } 72 } 73 74 server { 75 listen 443 ssl; 76 listen 80; 77 listen [::]:443 ssl; 78 listen [::]:80; 79 server_name backend.demo.taler.net; 80 include conf.d/talerssl; 81 82 location /public { 83 proxy_redirect off; 84 proxy_set_header Host $host; 85 proxy_set_header X-Forwarded-Host "backend.demo.taler.net"; 86 proxy_set_header X-Forwarded-Proto "https"; 87 proxy_pass http://unix:/home/demo/sockets/merchant.http:/public; 88 } 89 90 location / { 91 # match the ApiKey part ignoring case, and the actual key 92 # with case-sensitivity on. 93 if ($http_authorization !~ "(?i)ApiKey (?-i)sandbox") { 94 return 401; 95 } 96 proxy_redirect off; 97 proxy_set_header Host $host; 98 proxy_set_header X-Forwarded-Host "backend.demo.taler.net"; 99 proxy_set_header X-Forwarded-Proto "https"; 100 proxy_pass http://unix:/home/demo/sockets/merchant.http:/; 101 } 102 } 103 104 105 server { 106 listen 443 ssl; 107 listen [::]:443 ssl; 108 server_name donations.demo.taler.net; 109 include conf.d/talerssl; 110 111 location / { 112 uwsgi_pass unix:/home/demo/sockets/donations.uwsgi; 113 include /etc/nginx/uwsgi_params; 114 } 115 116 include conf.d/favicon_robots; 117 } 118 119 120 server { 121 listen 443 ssl; 122 listen [::]:443 ssl; 123 server_name shop.demo.taler.net; 124 include conf.d/talerssl; 125 126 location / { 127 uwsgi_pass unix:/home/demo/sockets/shop.uwsgi; 128 include /etc/nginx/uwsgi_params; 129 } 130 131 include conf.d/favicon_robots; 132 } 133 134 135 server { 136 server_name survey.demo.taler.net; 137 listen 443 ssl; 138 listen [::]:443 ssl; 139 include conf.d/talerssl; 140 141 location / { 142 uwsgi_pass unix:/home/demo/sockets/survey.uwsgi; 143 include /etc/nginx/uwsgi_params; 144 } 145 } 146 147 server { 148 listen 443 ssl; 149 listen [::]:443 ssl; 150 server_name bank.demo.taler.net; 151 include conf.d/talerssl; 152 153 location / { 154 uwsgi_pass unix:/home/demo/sockets/bank.uwsgi; 155 include /etc/nginx/uwsgi_params; 156 } 157 158 include conf.d/favicon_robots; 159 }