]> git.pld-linux.org Git - packages/gitlab-ce.git/blame - nginx.conf
v8.12.6
[packages/gitlab-ce.git] / nginx.conf
CommitLineData
98a1e18d
ER
1## GitLab
2##
3## Lines starting with two hashes (##) are comments with information.
4## Lines starting with one hash (#) are configuration parameters that can be uncommented.
5##
6###################################
7## configuration ##
8###################################
9
10upstream gitlab-workhorse {
9ce88a2e 11 server unix:/var/run/gitlab/gitlab-workhorse.socket fail_timeout=0;
98a1e18d
ER
12}
13
14server {
15 listen *:80;
16
17 server_name gitlab.example.org;
18
19 ## Don't show the nginx version number, a security best practice
20 server_tokens off;
21
22 ## Increase this if you want to upload large attachments
23 ## Or if you want to accept large git objects over http
24 client_max_body_size 0;
25
26 ## Individual nginx logs for this GitLab vhost
27 access_log /var/log/nginx/gitlab_access.log gitlab_access;
28 error_log /var/log/nginx/gitlab_error.log;
29
30 location / {
31 ## If you use HTTPS make sure you disable gzip compression
32 ## to be safe against BREACH attack.
4dbbdc7e 33 #gzip off;
98a1e18d
ER
34
35 ## https://github.com/gitlabhq/gitlabhq/issues/694
36 ## Some requests take more than 30 seconds.
37 proxy_read_timeout 300;
38 proxy_connect_timeout 300;
39 proxy_redirect off;
40
41 proxy_http_version 1.1;
42
43 proxy_set_header Host $http_host;
7a2dc96e 44 proxy_set_header X-Forwarded-Host "";
98a1e18d
ER
45 proxy_set_header X-Real-IP $remote_addr;
46 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47 proxy_set_header X-Forwarded-Proto http;
48
49 proxy_pass http://gitlab-workhorse;
50 }
51
52 error_page 404 /404.html;
53 error_page 422 /422.html;
54 error_page 500 /500.html;
55 error_page 502 /502.html;
56
57 location ~ ^/(404|422|500|502)\.html$ {
34df8417 58 root /usr/lib/gitlab/public;
98a1e18d
ER
59 internal;
60 }
61}
This page took 1.037155 seconds and 4 git commands to generate.