| lombardofr | c89a4a0 | 2018-09-02 16:15:25 +0200 | [diff] [blame] | 1 | # nginx-app.conf |
| 2 | |
| 3 | # configuration of the server |
| 4 | server { |
| 5 | |
| 6 | listen 80; |
| 7 | |
| 8 | charset utf-8; |
| 9 | |
| 10 | # max upload size |
| 11 | client_max_body_size 75M; |
| 12 | |
| 13 | location /static/ { |
| garciadeblas | f5c3307 | 2018-09-27 18:03:45 +0200 | [diff] [blame] | 14 | alias /usr/share/osm-lightui/static/; |
| lombardofr | c89a4a0 | 2018-09-02 16:15:25 +0200 | [diff] [blame] | 15 | } |
| 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 | # } |
| garciadeblas | f5c3307 | 2018-09-27 18:03:45 +0200 | [diff] [blame] | 58 | } |