diff options
Diffstat (limited to 'historic/guix/etc/nginx/nginx.conf')
-rw-r--r-- | historic/guix/etc/nginx/nginx.conf | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/historic/guix/etc/nginx/nginx.conf b/historic/guix/etc/nginx/nginx.conf new file mode 100644 index 0000000..4b5de00 --- /dev/null +++ b/historic/guix/etc/nginx/nginx.conf @@ -0,0 +1,82 @@ +user nginx; +worker_processes 4; +pid /var/run/nginx.pid; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # Logging Settings + ## + + log_format main '$remote_addr - $remote_user [$time_local] $host ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent"'; + + client_body_temp_path /var/run/nginx/body_temp; + proxy_temp_path /var/run/nginx/proxy_temp; + fastcgi_temp_path /var/run/nginx/fastcgi_temp; + uwsgi_temp_path /var/run/nginx/uwsgi_temp; + scgi_temp_path /var/run/nginx/scgi_temp; + access_log /var/log/nginx/access.log main; + error_log /var/log/nginx/error.log notice; + + ## + # Gzip Settings + ## + + gzip on; + gzip_disable "msie6"; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + # This isn't entirely correct since it does + # not consider the weighting of languages, but + # for now it's good enough. + map $http_accept_language $index_redirect_uri { + default "en"; + # prefer language that's first in the list + ~^en "en"; + ~^de "de"; + ~^fr "fr"; + ~^es "it"; + # if none matches, take one later in the list + ~,en "en"; + ~,de "de"; + ~,fr "fr"; + ~,es "it"; + } + + ## + # Virtual Host Configs + ## + + include conf.d/*.conf; + include sites-enabled/*.site; +} |