6 server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
10 listen *:80 default_server; # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
11 server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
12 server_tokens off; # don't show the version number, a security best practice
13 root /home/git/gitlab/public;
15 # Set value of client_max_body_size to at least the value of git.max_size in gitlab.yml
16 # Also increase this if you want to upload large attachments
17 client_max_body_size 5m;
19 # individual nginx logs for this gitlab vhost
20 access_log /var/log/nginx/gitlab_access.log;
21 error_log /var/log/nginx/gitlab_error.log;
24 # serve static files from defined root folder;.
25 # @gitlab is a named location for the upstream fallback, see below
26 try_files $uri $uri/index.html $uri.html @gitlab;
29 # if a file, which is not found in the root folder is requested,
30 # then the proxy pass the request to the upsteam (gitlab unicorn)
32 proxy_read_timeout 300; # Some requests take more than 30 seconds.
33 proxy_connect_timeout 300; # Some requests take more than 30 seconds.
36 proxy_set_header X-Forwarded-Proto $scheme;
37 proxy_set_header Host $http_host;
38 proxy_set_header X-Real-IP $remote_addr;
39 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
41 proxy_pass http://gitlab;