-
Notifications
You must be signed in to change notification settings - Fork 0
/
rex.fitness.conf
47 lines (40 loc) · 1.28 KB
/
rex.fitness.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
}
server {
listen 80;
server_name rex.fitness www.rex.fitness;
return 301 https://rex.fitness$request_uri;
}
server {
listen 443 ssl;
keepalive_timeout 70;
ssl_certificate /etc/ssl/ssl_bundle.crt;
ssl_certificate_key /etc/ssl/www_original_rex_fitness.key;
server_name rex.fitness www.rex.fitness;
root /var/www/rex.fitness;
index index.html;
gzip on;
gzip_comp_level 3;
gzip_types text/plain text/css application/javascript image/*;
location / {
try_files $uri $uri/ /index.html;
}
location /rex-api {
proxy_pass http://localhost:3333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/rex-api/?(.*) /$1 break;
proxy_redirect off;
}
expires $expires;
}