diff options
Diffstat (limited to 'lib/support/nginx/gitlab-pages')
-rw-r--r-- | lib/support/nginx/gitlab-pages | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/support/nginx/gitlab-pages b/lib/support/nginx/gitlab-pages index 6300c268521..0eeb0cd1917 100644 --- a/lib/support/nginx/gitlab-pages +++ b/lib/support/nginx/gitlab-pages @@ -1,21 +1,18 @@ -## GitLab -## - ## Pages serving host server { listen 0.0.0.0:80; listen [::]:80 ipv6only=on; ## Replace this with something like pages.gitlab.com - server_name *.YOUR_GITLAB_PAGES.DOMAIN; - root /home/git/gitlab/shared/pages/${host}; + server_name ~^(?<group>.*)\.YOUR_GITLAB_PAGES\.DOMAIN$; + root /home/git/gitlab/shared/pages/${group}; ## Individual nginx logs for GitLab pages access_log /var/log/nginx/gitlab_pages_access.log; error_log /var/log/nginx/gitlab_pages_error.log; - # 1. Try to get /project/ from => shared/pages/${host}/${project}/public/ - # 2. Try to get / from => shared/pages/${host}/${host}/public/ + # 1. Try to get /project/ to => shared/pages/${group}/public/ or index.html + # 2. Try to get / to => shared/pages/${group}/${host}/public/ or index.html location ~ ^/([^/]*)(/.*)?$ { try_files "/$1/public$2" "/$1/public$2/index.html" |