~bhdouglass/uappexplorer/trunk

« back to all changes in this revision

Viewing changes to deploy/nginx.conf

  • Committer: Brian Douglass
  • Date: 2017-12-11 20:14:26 UTC
  • Revision ID: git-v1:1a56842a871788d38748548746f6f57b070b9464
Added deployment configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
server {
 
2
    listen 80 default_server;
 
3
    return 444;
 
4
}
 
5
 
 
6
server {
 
7
    listen 80;
 
8
    server_name staging.uappexplorer.com;
 
9
    return 301 https://$host$request_uri;
 
10
}
 
11
 
 
12
server {
 
13
    listen 443 ssl;
 
14
    server_name staging.uappexplorer.com;
 
15
 
 
16
    if ($host !~* ^staging\.uappexplorer\.com$ ) {
 
17
        return 444;
 
18
    }
 
19
 
 
20
    ssl on;
 
21
    ssl_certificate /etc/letsencrypt/live/staging.uappexplorer.com/fullchain.pem;
 
22
    ssl_certificate_key /etc/letsencrypt/live/staging.uappexplorer.com/privkey.pem;
 
23
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 
24
 
 
25
    gzip on;
 
26
    gzip_min_length 500;
 
27
    gzip_types text/plain text/html application/json application/javascript text/css;
 
28
 
 
29
    client_max_body_size 100M;
 
30
 
 
31
    location / {
 
32
        proxy_pass http://localhost:8081/;
 
33
        proxy_set_header Host $host;
 
34
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
35
    }
 
36
 
 
37
    location /static {
 
38
        root /srv/openstore-web/dist/;
 
39
    }
 
40
}