diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-18 12:18:11 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:53:55 +0000 |
commit | 4afab3d4b64bf4aac228306636bb1b477debe8ce (patch) | |
tree | 9f26dd9ad06ab3976b328b330b4cc0e13185fc0d /lib/support/nginx/gitlab-pages | |
parent | 6bb7a19c2b4b130438cc4f24512feac9941a9b02 (diff) | |
download | gitlab-ce-4afab3d4b64bf4aac228306636bb1b477debe8ce.tar.gz |
Revert "Store pages in shared/pages/fqdn/fqdn/public or shared/pages/fqdn/subpath/public - makes it simpler to implement CNAMEs in future"
This reverts commit 86a2a78f0d13a678899460638add6b862059433e.
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" |