-
Notifications
You must be signed in to change notification settings - Fork 21
/
webed.conf
109 lines (90 loc) · 3.46 KB
/
webed.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name localhost notex;
access_log /var/log/nginx/webed.access.log;
error_log /var/log/nginx/webed.errors.log;
location / { try_files $uri @webed; }
location @webed {
include uwsgi_params;
uwsgi_pass unix:/var/www/webed/uwsgi.sock;
}
location /cache {
internal;
set $memcached_key $args;
memcached_pass 127.0.0.1:11211;
default_type application/octet-stream;
expires 15s;
add_header Cache-Control private;
error_page 404 = @webed;
}
location /static {
root /srv/notex.git/webed;
access_log /var/log/nginx/webed.access-static.log;
add_header Cache-Control public;
expires 1d;
location ~* sprite-(?:\w+)\.png$ {
add_header Cache-Control no-cache;
}
}
location /dictionaries {
alias /srv/notex.git/webed/static/lib/typojs.git/typo/dictionaries;
gzip_types application/octet-stream;
add_header Cache-Control public;
expires 1w;
}
location /admin/static {
alias /srv/notex.git/lib/python2.7/site-packages/Flask_Admin-1.0.7-py2.7.egg/flask_admin/static;
access_log /var/log/nginx/webed.access-static.log;
expires 1w;
}
location /extjs {
alias /srv/notex.git/webed/static/lib/extjs.git;
expires 1w;
}
location /robots.txt {
alias /etc/nginx/conf.d/robots.txt;
expires 1h;
}
location /favicon.ico {
root /srv/notex.git/webed/static/ico;
expires 1h;
}
location /sitemap.xml {
root /srv/notex.git/webed/static/webed-ext;
expires 1h;
}
location /sphinx.err {
alias /var/www/webed/sphinx;
autoindex on;
autoindex_localtime on;
autoindex_exact_size off;
}
location /git {
proxy_pass http://localhost:8008/git;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_buffering off;
proxy_redirect off;
}
location /git-remote {
alias /var/www/webed/acid;
}
}
server {
listen 80;
listen [::]:80;
server_name static.localhost static.notex;
access_log /var/log/nginx/webed.access.log;
error_log /var/log/nginx/webed.errors.log;
location / {
root /srv/notex.git/webed/static;
access_log /var/log/nginx/webed.access-static.log;
add_header Cache-Control public;
expires 1w;
location ~* sprite-(?:\w+)\.png$ {
add_header Cache-Control no-cache;
}
}
}