-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-natar.conf
63 lines (44 loc) · 1.43 KB
/
nginx-natar.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#user html;
# user root root;
worker_processes 1;
error_log /usr/share/natar-utilities/log/error.log;
error_log /usr/share/natar-utilities/log/error.log notice;
error_log /usr/share/natar-utilities/log/error.log info;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/share/natar-utilities/log/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# use the socket we configured in our unicorn.rb
upstream unicorn_server {
server unix:/usr/share/natar-webserver/tmp/sockets/unicorn.sock
fail_timeout=0;
}
server {
server_name natar-web;
listen 80;
root /usr/share/natar-webserver/public;
#charset koi8-r;
access_log /usr/share/natar-webserver/log/host.access.log;
location / {
try_files $uri @app;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
# pass to the upstream unicorn server mentioned above
proxy_pass http://unicorn_server;
}
}
}