File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -10,27 +10,25 @@ server {
10
10
listen YOUR_SERVER_IP:80; # e.g., listen 192.168.1.1:80;
11
11
server_name YOUR_SERVER_FQDN; # e.g., server_name source.example.com;
12
12
root /home/gitlab/gitlab/public;
13
-
13
+
14
14
# individual nginx logs for this gitlab vhost
15
15
access_log /var/log/nginx/gitlab_access.log;
16
16
error_log /var/log/nginx/gitlab_error.log;
17
-
17
+
18
18
location / {
19
19
# serve static files from defined root folder;.
20
20
# @gitlab is a named location for the upstream fallback, see below
21
21
try_files $uri $uri/index.html $uri.html @gitlab;
22
22
}
23
-
24
- # if a file, which is not found in the root folder is requested,
23
+
24
+ # if a file, which is not found in the root folder is requested,
25
25
# then the proxy pass the request to the upsteam (gitlab unicorn)
26
26
location @gitlab {
27
27
proxy_redirect off;
28
-
29
- # you need to change this to "https", if you set "ssl" directive to "on"
30
- proxy_set_header X-FORWARDED_PROTO http;
28
+ proxy_set_header X-Forwarded-Proto $scheme;
31
29
proxy_set_header Host $http_host;
32
30
proxy_set_header X-Real-IP $remote_addr;
33
-
31
+
34
32
proxy_pass http://gitlab;
35
33
}
36
34
}
You can’t perform that action at this time.
0 commit comments