Mercurial > hg > orthanc-stone
annotate Applications/Samples/rt-viewer-demo/nginx.local.conf @ 622:8a3a25f2d42c
uncoupling oracle from context
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 May 2019 12:32:21 +0200 |
parents | 1d9deb4ee84c |
children |
rev | line source |
---|---|
549
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 # Local config to serve the WASM samples static files and reverse proxy Orthanc. |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 # Uses port 9977 instead of 80. |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 # `events` section is mandatory |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
5 events { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
6 worker_connections 1024; # Default: 1024 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 } |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 http { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 # prevent nginx sync issues on OSX |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 proxy_buffering off; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 server { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
15 listen 9977 default_server; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
16 client_max_body_size 4G; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
18 # location may have to be adjusted depending on your OS and nginx install |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
19 include /etc/nginx/mime.types; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 # if not in your system mime.types, add this line to support WASM: |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 # types { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 # application/wasm wasm; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 # } |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
24 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
25 # serve WASM static files |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
26 root build-web/; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
27 location / { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
28 } |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
29 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
30 # reverse proxy orthanc |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 location /orthanc/ { |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 rewrite /orthanc(.*) $1 break; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 proxy_pass http://127.0.0.1:8042; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 proxy_set_header Host $http_host; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 proxy_set_header my-auth-header good-token; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 proxy_request_buffering off; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 proxy_max_temp_file_size 0; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 client_max_body_size 0; |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 } |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 } |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 |
1d9deb4ee84c
Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 } |