nginx.conf.in 1.83 KB
Newer Older
1 2 3 4
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab-ssl
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
5
# (last updated for omnibus-gitlab 8.7.9+ce.1-0-gf589ad7)
6

7 8 9 10 11 12 13
{% from 'macrolib.cfg.in' import cfg  with context %}

# user directive makes sense only when running initially as root
# (and nginx will complain if not and directive given)
# user {{ backend_info.user }};

worker_processes {{ cfg('nginx_worker_processes') }};
14
error_log stderr;
15
pid {{ directory.run }}/nginx.pid;
16 17 18 19

daemon off;

events {
20
  worker_connections {{ cfg('nginx_worker_connections') }};
21 22 23
}

http {
24 25
  log_format gitlab_access '{{ cfg("nginx_log_format") }}';
  {# we do not use: ci, mattermost
26 27
  log_format gitlab_ci_access '<%= @gitlab_ci_access_log_format %>';
  log_format gitlab_mattermost_access '<%= @gitlab_mattermost_access_log_format %>';
28
  #}
29

30 31 32
  sendfile    {{ cfg('nginx_sendfile') }};
  tcp_nopush  {{ cfg('nginx_tcp_nopush') }};
  tcp_nodelay {{ cfg('nginx_tcp_nodelay') }};
33

34
  keepalive_timeout {{ cfg('nginx_keepalive_timeout') }};
35

36 37 38 39 40
  gzip              {{ cfg('nginx_gzip') }};
  gzip_http_version {{ cfg('nginx_gzip_http_version') }};
  gzip_comp_level   {{ cfg('nginx_gzip_comp_level') }};
  gzip_proxied      {{ cfg('nginx_gzip_proxied') }};
  gzip_types        {{ cfg('nginx_gzip_types') }};
41

42
  include {{ nginx_mime_types }};
43

44 45 46
  {# we do not do nginx caching:
     - gitlab-workhorse serves raw blobs fast
     - we have caches on frontend nodes
47 48
  proxy_cache_path <%= @proxy_cache_path %>;
  proxy_cache <%= @proxy_cache %>;
49
  #}
50

51
  include {{ nginx_gitlab_http_conf }};
52

53
  {# we don't need: ci, pages, mattermost
54
  include <%= @gitlab_ci_http_config %>
55
  include <%= @gitlab_pages_http_config %>;
56 57
  include <%= @gitlab_mattermost_http_config %>
  #}
58
}