3 ## Lines starting with two hashes (##) are comments with information.
4 ## Lines starting with one hash (#) are configuration parameters that can be uncommented.
6 ###################################
8 ###################################
10 upstream gitlab-workhorse {
11 server unix:/var/run/gitlab/gitlab-workhorse.socket fail_timeout=0;
17 server_name gitlab.example.org;
19 ## Don't show the nginx version number, a security best practice
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;
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;
31 ## If you use HTTPS make sure you disable gzip compression
32 ## to be safe against BREACH attack.
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;
41 proxy_http_version 1.1;
43 proxy_set_header Host $http_host;
44 proxy_set_header X-Forwarded-Host "";
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;
49 proxy_pass http://gitlab-workhorse;
52 error_page 404 /404.html;
53 error_page 422 /422.html;
54 error_page 500 /500.html;
55 error_page 502 /502.html;
57 location ~ ^/(404|422|500|502)\.html$ {
58 root /usr/lib/gitlab/public;