forked from treeio/treeio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
49 lines (37 loc) · 1.41 KB
/
nginx.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
# Django-friendly config
server {
listen 80;
server_name example.com;
access_log /srv/vhosts/example.com/logs/access.log;
error_log /srv/vhosts/example.com/logs/error.log;
location /static {
root /srv/vhosts/example.com/treeio;
expires 360d;
}
location /favicon.ico {
alias /srv/vhosts/example.com/treeio/static/favicon.ico;
}
location /robots.txt {
alias /srv/vhosts/example.com/treeio/static/robots.txt;
}
location / {
fastcgi_pass unix:/tmp/treeio.fcgi;
# for a TCP host/port:
# fastcgi_pass {hostname}:{port};
# necessary parameter
fastcgi_param PATH_INFO $fastcgi_script_name;
# to deal with POST requests
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
# http://stackoverflow.com/questions/605173/how-to-nginx-virtual-servers-fcgi-for-django uses many other parameters,
# some may be necessary in some situations
}
}