nginx.conf 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # nginx.conf -- docker-openresty
  2. #
  3. # This file is installed to:
  4. # `/usr/local/openresty/nginx/conf/nginx.conf`
  5. # and is the file loaded by nginx at startup,
  6. # unless the user specifies otherwise.
  7. #
  8. # It tracks the upstream OpenResty's `nginx.conf`, but removes the `server`
  9. # section and adds this directive:
  10. # `include /etc/nginx/conf.d/*.conf;`
  11. #
  12. # The `docker-openresty` file `nginx.vh.default.conf` is copied to
  13. # `/etc/nginx/conf.d/default.conf`. It contains the `server section
  14. # of the upstream `nginx.conf`.
  15. #
  16. # See https://github.com/openresty/docker-openresty/blob/master/README.md#nginx-config-files
  17. #
  18. #user nobody;
  19. #worker_processes 1;
  20. # Enables the use of JIT for regular expressions to speed-up their processing.
  21. pcre_jit on;
  22. #error_log logs/error.log;
  23. #error_log logs/error.log notice;
  24. #error_log logs/error.log info;
  25. #pid logs/nginx.pid;
  26. events {
  27. worker_connections 1024;
  28. }
  29. http {
  30. include mime.types;
  31. default_type application/octet-stream;
  32. # Enables or disables the use of underscores in client request header fields.
  33. # When the use of underscores is disabled, request header fields whose names contain underscores are marked as invalid and become subject to the ignore_invalid_headers directive.
  34. # underscores_in_headers off;
  35. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  36. # '$status $body_bytes_sent "$http_referer" '
  37. # '"$http_user_agent" "$http_x_forwarded_for"';
  38. #access_log logs/access.log main;
  39. # Log in JSON Format
  40. # log_format nginxlog_json escape=json '{ "timestamp": "$time_iso8601", '
  41. # '"remote_addr": "$remote_addr", '
  42. # '"body_bytes_sent": $body_bytes_sent, '
  43. # '"request_time": $request_time, '
  44. # '"response_status": $status, '
  45. # '"request": "$request", '
  46. # '"request_method": "$request_method", '
  47. # '"host": "$host",'
  48. # '"upstream_addr": "$upstream_addr",'
  49. # '"http_x_forwarded_for": "$http_x_forwarded_for",'
  50. # '"http_referrer": "$http_referer", '
  51. # '"http_user_agent": "$http_user_agent", '
  52. # '"http_version": "$server_protocol", '
  53. # '"nginx_access": true }';
  54. # access_log /dev/stdout nginxlog_json;
  55. access_log logs/access.log combined;
  56. # See Move default writable paths to a dedicated directory (#119)
  57. # https://github.com/openresty/docker-openresty/issues/119
  58. client_body_temp_path /var/run/openresty/nginx-client-body;
  59. proxy_temp_path /var/run/openresty/nginx-proxy;
  60. fastcgi_temp_path /var/run/openresty/nginx-fastcgi;
  61. uwsgi_temp_path /var/run/openresty/nginx-uwsgi;
  62. scgi_temp_path /var/run/openresty/nginx-scgi;
  63. sendfile on;
  64. #tcp_nopush on;
  65. #keepalive_timeout 0;
  66. keepalive_timeout 65;
  67. #gzip on;
  68. include /etc/nginx/conf.d/*.conf;
  69. # Don't reveal OpenResty version to clients.
  70. server_tokens off;
  71. more_clear_headers 'Server';
  72. }
  73. include /etc/nginx/conf.d/*.main;