gitlab-pages 828 Bytes
Newer Older
1
2
3
## GitLab
##

4
5
6
7
8
9
## Pages serving host
server {
  listen 0.0.0.0:80;
  listen [::]:80 ipv6only=on;

  ## Replace this with something like pages.gitlab.com
10
  server_name ~^.*\.YOUR_GITLAB_PAGES\.DOMAIN$;
11
12
13
14
15

  ## Individual nginx logs for GitLab pages
  access_log  /var/log/nginx/gitlab_pages_access.log;
  error_log   /var/log/nginx/gitlab_pages_error.log;

16
17
18
19
20
  location / {
    proxy_set_header    Host                $http_host;
    proxy_set_header    X-Real-IP           $remote_addr;
    proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-Proto   $scheme;
21
22
23

    proxy_cache off;

24
    # The same address as passed to GitLab Pages: `-listen-proxy`
25
    proxy_pass http://localhost:8090/;
26
27
28
29
30
31
  }

  # Define custom error pages
  error_page 403 /403.html;
  error_page 404 /404.html;
}