-
Notifications
You must be signed in to change notification settings - Fork 9
/
project.conf.erb
41 lines (33 loc) · 899 Bytes
/
project.conf.erb
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
upstream api {
server unix:///home/deployer/www/project/shared/tmp/sockets/puma.sock;
}
server {
listen 80;
server_name _;
return $scheme://MACHINE_IP$request_uri;
}
server {
listen 80;
client_max_body_size 100m;
server_name MACHINE_IP;
root /home/deployer/www/project/current/public;
access_log off;
error_log /var/log/nginx/error.log crit;
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
location / {
proxy_pass http://api;
proxy_set_header Client-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
}
location /monit/ {
rewrite ^/monit/(.*) /$1 break;
proxy_ignore_client_abort on;
proxy_pass http://127.0.0.1:2812;
proxy_redirect http://127.0.0.1:2812 /monit;
proxy_cookie_path / /monit/;
}
}