forked from tsaylor/Maker-Network
-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf.in
60 lines (47 loc) · 1.72 KB
/
nginx.conf.in
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
worker_processes 4;
daemon off;
pid {{working_dir}}/nginx.pid;
error_log {{working_dir}}/nginx_err.log;
events {
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
access_log {{working_dir}}/nginx_acc.log;
sendfile on;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server {
listen 8000;
server_name localhost;
location /admin/media/ {
autoindex on;
alias {{virtualenv}}/lib/python2.6/site-packages/django/contrib/admin/static/;
}
location /media/ {
autoindex on;
alias {{code_dir}}/media/;
}
location / {
uwsgi_pass unix:{{working_dir}}/mkn.uwsgi.sock;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root html;
index index.html index.htm;
}
}
}