Commit ccf686315522f422f4777c1285198839dd33226b
1 parent
08cb6f14
Exists in
master
and in
13 other branches
Adding nginx configs for colab
Showing
3 changed files
with
40 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,8 @@ |
| 1 | +add_header Vary Accept-Encoding; | |
| 2 | +add_header Cache-control public; | |
| 3 | + | |
| 4 | +log_format proxy '$remote_addr $http_x_forwarded_for ' | |
| 5 | + '$remote_user [$time_local] "$request" ' | |
| 6 | + '$upstream_status "$http_referer" ' | |
| 7 | + 'response_time: $upstream_response_time ' | |
| 8 | + 'cache_status: $upstream_cache_status'; | |
| 0 | 9 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,31 @@ |
| 1 | +upstream django { | |
| 2 | + server 127.0.0.1:8000; | |
| 3 | +} | |
| 4 | + | |
| 5 | +server { | |
| 6 | + listen 80 default_server; | |
| 7 | + | |
| 8 | + root /; | |
| 9 | + server_name localhost colab.interlegis.leg.br colab.interlegis.gov.br; | |
| 10 | + | |
| 11 | + location @django { | |
| 12 | + proxy_hide_header Vary; | |
| 13 | + proxy_read_timeout 300s; | |
| 14 | + proxy_connect_timeout 300s; | |
| 15 | + proxy_pass_header Server; | |
| 16 | + proxy_set_header Host $http_host; | |
| 17 | + proxy_redirect off; | |
| 18 | + proxy_set_header X-Real-IP $remote_addr; | |
| 19 | + proxy_set_header X-Scheme $scheme; | |
| 20 | + proxy_pass http://django; | |
| 21 | + access_log /var/log/nginx/proxy-access.log proxy; | |
| 22 | + } | |
| 23 | + | |
| 24 | + location / { | |
| 25 | + try_files /home/colab/colab/www$uri @django; | |
| 26 | + } | |
| 27 | + | |
| 28 | + location /static { | |
| 29 | + try_files /home/colab/colab/www$uri @django; | |
| 30 | + } | |
| 31 | +} | |
| 0 | 32 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +Subproject commit 154e8cb9f34495e10d107c77bce7b44187d8ce1a | ... | ... |