limit_req_zone $server_name zone=radicle:150m rate=50r/s; upstream radicle { server 172.16.1.78:8080; } server { listen 80; listen [::]:80; server_name rad.hardenedbsd.org; #lingering_time 360s; #lingering_timeout 280s; proxy_buffering off; http2 on; include /usr/local/etc/nginx/common.conf; location ~ ^/api/v1/repos/.*/stats { return 404; } location ~ ^/raw/.*/archive { proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } location ~ ^/api { limit_req zone=radicle burst=25; proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } location / { proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } } server { listen 443 ssl; listen [::]:443 ssl; server_name rad.hardenedbsd.org; #lingering_time 360s; #lingering_timeout 280s; #client_max_body_size 10G; proxy_buffering off; http2 on; include /usr/local/etc/nginx/common.conf; location ~ ^/api/v1/repos/.*/stats { return 404; } location ~ ^/raw/.*/archive { proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } location ~ ^/api { limit_req zone=radicle burst=25; proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } location / { proxy_pass http://radicle; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; break; } }