| # Copyright 2019 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| worker_processes auto; |
| |
| error_log /var/log/nginx/nginx_error.log warn; |
| pid /var/run/nginx.pid; |
| |
| |
| events { |
| worker_connections 1024; |
| } |
| |
| http { |
| server { |
| listen 6010 default_server; |
| server_tokens off; |
| |
| location /results/ { |
| proxy_redirect off; |
| proxy_set_header Host $host/; |
| autoindex on; |
| autoindex_exact_size off; |
| autoindex_format html; |
| autoindex_localtime on; |
| |
| aio threads; |
| directio 64M; |
| output_buffers 10 50M; |
| |
| sendfile on; |
| sendfile_max_chunk 50m; |
| } |
| |
| location /index.html { |
| expires -1; |
| add_header Cache-Control 'no-store, no-cache, must-revalidate, |
| proxy-revalidate, max-age=0'; |
| } |
| |
| location ~ .*\.css$|.*\.js$ { |
| add_header Cache-Control 'max-age=31449600'; # one year |
| } |
| |
| location / { |
| try_files $uri$args $uri$args/ /index.html; |
| add_header Cache-Control 'max-age=86400'; # one day |
| } |
| |
| } |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
| types { |
| text/plain DEBUG ERROR INFO WARNING srv log ; |
| } |
| |
| log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
| '$status $body_bytes_sent "$http_referer" ' |
| '"$http_user_agent" "$http_x_forwarded_for"'; |
| |
| access_log /var/log/nginx/nginx_access.log main; |
| sendfile on; |
| keepalive_timeout 65; |
| include /etc/nginx/conf.d/*.conf; |
| } |
| |