-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
40 lines (33 loc) · 1.12 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
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
limit_conn_zone $binary_remote_addr zone=addrc:10m;
limit_req_zone $binary_remote_addr zone=addrr:10m rate=150r/s;
server {
listen 8080;
server_name localhost;
client_max_body_size 0;
root /Users/jongje/dev/crates.io-index;
index config.json;
limit_rate 1250k; # = 10 Mbps
limit_conn addrc 2; # = 20 Mbps
limit_req zone=addrr burst=2000; # buffer and delay any excess requests
location ~ /git(/.*) {
client_max_body_size 0;
fastcgi_param SCRIPT_FILENAME /usr/local/Cellar/git/2.29.2/libexec/git-core/git-http-backend;
include fastcgi_params;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /Users/jongje/dev/crates.io-index/.git;
fastcgi_param PATH_INFO $1;
fastcgi_pass unix:/tmp/fcgiwrap.socket;
}
}
include servers/*;
}