-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.test.compose
More file actions
91 lines (71 loc) · 2.86 KB
/
dev.test.compose
File metadata and controls
91 lines (71 loc) · 2.86 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
image/png png;
image/svg+xml svg svgz;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream puma_unk {
server localhost:3000;
}
server {
listen 8082;
server_name localhost:3000;
# ssl_certificate /etc/letsencrypt/live/www.unknownanalytics.com/cert.pem;
# ssl_certificate_key /etc/letsencrypt/live/www.unknownanalytics.com/privkey.pem;
# deny requests for files that should never be accessed
location ~ /\. {
deny all;
}
location ~* ^.+\.(rb|log)$ {
deny all;
}
location /cable {
proxy_pass http://puma_unk/cable;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# send non-static file requests to the app server
# serve static (compiled) assets directly if they exist (for rails production)
location ~ ^/(assets|images|javascripts|stylesheets|swfs|system)/ {
root /var/www/unk-ana-assets;
try_files $uri @puma_unk ;
access_log off;
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
add_header Last-Modified "";
add_header ETag "";
break;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Port $server_port;
proxy_set_header X-Real-Scheme $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://puma_unk;
}
}
}