2016-03-01 14:29:09 +01:00
|
|
|
# This is the /etc/nginx/nginx.conf file for mirrors.
|
|
|
|
|
|
|
|
user www-data;
|
2016-03-10 16:19:28 +01:00
|
|
|
worker_processes auto;
|
2016-03-01 14:29:09 +01:00
|
|
|
|
|
|
|
error_log /var/log/nginx/error.log error;
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
|
|
lock_file /var/lock/nginx.lock;
|
|
|
|
|
|
|
|
pcre_jit on;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
client_body_temp_path /var/lib/nginx/body;
|
|
|
|
proxy_temp_path /var/lib/nginx/proxy;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
|
|
|
|
# Maximum chunk size to send. Partly this is a workaround
|
|
|
|
# for <http://bugs.gnu.org/19939>, but also the nginx docs
|
|
|
|
# mention that "Without the limit, one fast connection may
|
|
|
|
# seize the worker process entirely."
|
|
|
|
# <http://nginx.org/en/docs/http/ngx_http_core_module#sendfile_max_chunk>
|
|
|
|
sendfile_max_chunk 1m;
|
|
|
|
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
# cache for narinfo files
|
|
|
|
proxy_cache_path /var/cache/nginx/narinfo
|
|
|
|
levels=2
|
2016-03-10 16:19:00 +01:00
|
|
|
inactive=7d # inactive keys removed after 7d
|
2016-03-01 14:29:09 +01:00
|
|
|
keys_zone=narinfo:8m # narinfo meta data: ~64K keys
|
|
|
|
max_size=4g; # total cache data size max
|
|
|
|
|
|
|
|
# cache for nar files
|
|
|
|
proxy_cache_path /var/cache/nginx/nar
|
|
|
|
levels=2
|
2016-03-10 16:19:00 +01:00
|
|
|
inactive=7d # inactive keys removed after 7d
|
2016-03-01 14:29:09 +01:00
|
|
|
keys_zone=nar:8m # nar cache meta data: ~64K keys
|
|
|
|
max_size=100g; # total cache data size max
|
|
|
|
|
|
|
|
# cache for static data
|
|
|
|
proxy_cache_path /var/cache/nginx/static
|
|
|
|
levels=1
|
2016-03-10 16:19:00 +01:00
|
|
|
inactive=7d # inactive keys removed after 7 days
|
2016-03-01 14:29:09 +01:00
|
|
|
keys_zone=static:1m # nar cache meta data: ~8K keys
|
|
|
|
max_size=2m; # total cache data size max
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name hydra.gnu.org;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/hydra.access.log;
|
|
|
|
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
2016-03-10 16:32:52 +01:00
|
|
|
include mirror-locations.conf;
|
2016-03-01 14:29:09 +01:00
|
|
|
}
|
2016-03-10 16:34:04 +01:00
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name hydra.gnunet.org;
|
|
|
|
keepalive_timeout 70;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/hydra.https.access.log;
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/hydra.gnunet.org/cert.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/hydra.gnunet.org/privkey.pem;
|
|
|
|
|
|
|
|
include mirror-locations.conf;
|
|
|
|
}
|
2016-03-01 14:29:09 +01:00
|
|
|
}
|