-
Notifications
You must be signed in to change notification settings - Fork 0
/
holin_nginx.conf
62 lines (52 loc) · 1.77 KB
/
holin_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
50
51
52
53
54
55
56
57
58
59
60
61
62
server {
server_name holin.pro;
charset utf-8;
access_log /var/log/nginx/holin-access.log ;
error_log /var/log/nginx/holin-error.log ;
client_max_body_size 40M;
gzip on;
gzip_comp_level 9;
gzip_types application/x-javascript text/css;
gzip_vary on;
# project media assuming it's called at media/
# keep in mind that media/ will be maintained as a directory by the root command
location ^~ /static/ {
root /var/www/holin/;
expires 30d;
}
location ^~ /media/ {
root /var/www/holin/holin/;
expires 30d;
}
# admin uses admin-media/
# alias works different than root above by dropping admin-media
#location ^~ /admin-media/ {
# alias /var/lib/python-support/python2.6/django/contrib/admin/media/;
#}
location / {
# host and port to fastcgi server
fastcgi_pass 127.0.0.1:10090;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
# todo: setup 404 for the /media directory.
# / directory will be handled by django url dispatcher
#error_page 404 /404.html;
#location = /404.html {
# root /var/www/nginx-default;
#}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}
}