blob: 75f4878edfb14b725833b852eefd2bc576e9ae4c [file] [log] [blame]
lombardofrc89a4a02018-09-02 16:15:25 +02001# nginx-app.conf
2
3# configuration of the server
4server {
5
6 listen 80;
7
8 charset utf-8;
9
10 # max upload size
11 client_max_body_size 75M;
12
13 location /static/ {
garciadeblasf5c33072018-09-27 18:03:45 +020014 alias /usr/share/osm-lightui/static/;
lombardofrc89a4a02018-09-02 16:15:25 +020015 }
16
17 location / {
18 proxy_pass http://localhost:8000;
19 proxy_set_header Upgrade $http_upgrade;
20 proxy_set_header Connection "upgrade";
21 proxy_set_header Host $host;
22 proxy_set_header X-Real-IP $remote_addr;
23 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
24 }
25
26 # -----------
27 # Enable GZIP
28 # -----------
29 gzip on;
30 gzip_disable "msie6";
31 gzip_vary on;
32 gzip_types text/plain
33 text/css
34 application/json
35 application/javascript
36 application/x-javascript
37 text/xml
38 application/xml
39 application/xml+rss
40 text/javascript
41 image/svg+xml;
42 gzip_proxied any;
43 gzip_comp_level 6;
44 gzip_buffers 16 8k;
45 gzip_http_version 1.0;
46
47 # ------------
48 # Cache assets
49 # ------------
50# location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css
51# |rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz
52# |gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi
53# |wav|bmp|rtf)$ {
54# expires max;
55# log_not_found off;
56# access_log off;
57# }
garciadeblasf5c33072018-09-27 18:03:45 +020058}