X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fnginx%2Fnginx.conf;h=25aa317decdc1c18493dfef73dbd73164f4627ea;hb=4792e8ffe4f5e73e5dea04192b7070de11d034d8;hp=216e273adc0963d5b4560c48b7e587a14654a8fc;hpb=69b12c8b4360bdf14f0844140e88ef40a3d6e16f;p=lhc%2Fateliers.git diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 216e273..25aa317 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -66,12 +66,14 @@ http { open_file_cache_valid 30s; open_log_file_cache max=1000 inactive=20s min_uses=2 valid=1m; proxy_cache_use_stale updating; + proxy_temp_path /run/shm/cache/nginx/proxy_temp 1 2; reset_timedout_connection on; send_timeout 60; # NOTE: if the client stops reading data, free up the stale client connection after this much time. sendfile on; server_names_hash_bucket_size 128; server_tokens off; + ssl_session_cache shared:SSL:10m; tcp_nodelay on; # NOTE: don't buffer data-sends (disable Nagle algorithm). # Good for sending frequent small bursts of data in real time. @@ -81,14 +83,14 @@ http { # This is useful for prepending headers before calling sendfile, # or for throughput optimization. types_hash_max_size 2048; - ## Add here all user agents that are to be blocked. map $http_user_agent $bad_bot { + # NOTE: user agents that are to be blocked. default 0; libwww-perl 1; ~(?i)(httrack|htmlparser|libwww) 1; } - ## Add here all referrers that are to blocked. #map $http_referer $bad_referer { + # # NOTE: referrers that are to be blocked. # default 0; # ~(?i)(babes|casino|click|diamond|forsale|girl|jewelry|love|nudit|organic|poker|porn|poweroversoftware|replica|sex|teen|webcam|zippo) 1; # } @@ -98,6 +100,19 @@ http { } include /etc/nginx/site.d/*/http.conf; include /etc/nginx/site.d/*/server.conf; + server { + listen 80 default_server; + server_name _; + return 302 $scheme://heureux-cyclage.org$request_uri; + } + server { + listen 443 default_server; + server_name _; + include /etc/nginx/conf.d/ssl.conf; + ssl_certificate /etc/nginx/x509.d/cyclo-www-tls/crt.pem; + ssl_certificate_key /etc/nginx/x509.d/cyclo-www-tls/key.pem; + return 302 $scheme://cyclocoop.org$request_uri; + } } pid /run/nginx.pid; user www-data;