summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/pages/administration.md10
-rw-r--r--lib/support/nginx/gitlab-pages2
-rw-r--r--lib/support/nginx/gitlab-pages-ssl4
3 files changed, 8 insertions, 8 deletions
diff --git a/doc/pages/administration.md b/doc/pages/administration.md
index f67bb63ff07..30d2b46c36a 100644
--- a/doc/pages/administration.md
+++ b/doc/pages/administration.md
@@ -414,20 +414,20 @@ not remove the backslashes.
If your GitLab pages domain is `example.io`, replace:
```bash
-server_name ~^(?<group>.*)\.YOUR_GITLAB_PAGES\.DOMAIN$;
+server_name ~^.*\.YOUR_GITLAB_PAGES\.DOMAIN$;
```
with:
```
-server_name ~^(?<group>.*)\.example\.io$;
+server_name ~^.*\.example\.io$;
```
-If you are using a subdomain, make sure to escape all dots (`.`) with a
-backslash (\). For example `pages.example.io` would be:
+If you are using a subdomain, make sure to escape all dots (`.`) except from
+the first one with a backslash (\). For example `pages.example.io` would be:
```
-server_name ~^(?<group>.*)\.pages\.example\.io$;
+server_name ~^.*\.pages\.example\.io$;
```
## Set maximum pages size
diff --git a/lib/support/nginx/gitlab-pages b/lib/support/nginx/gitlab-pages
index 169d7d11ca7..d9746c5c1aa 100644
--- a/lib/support/nginx/gitlab-pages
+++ b/lib/support/nginx/gitlab-pages
@@ -7,7 +7,7 @@ server {
listen [::]:80 ipv6only=on;
## Replace this with something like pages.gitlab.com
- server_name ~^(?<group>.*)\.YOUR_GITLAB_PAGES\.DOMAIN$;
+ server_name ~^.*\.YOUR_GITLAB_PAGES\.DOMAIN$;
## Individual nginx logs for GitLab pages
access_log /var/log/nginx/gitlab_pages_access.log;
diff --git a/lib/support/nginx/gitlab-pages-ssl b/lib/support/nginx/gitlab-pages-ssl
index 16edd337e10..a1ccf266835 100644
--- a/lib/support/nginx/gitlab-pages-ssl
+++ b/lib/support/nginx/gitlab-pages-ssl
@@ -11,7 +11,7 @@ server {
listen [::]:80 ipv6only=on;
## Replace this with something like pages.gitlab.com
- server_name ~^(?<group>.*)\.YOUR_GITLAB_PAGES\.DOMAIN$;
+ server_name ~^.*\.YOUR_GITLAB_PAGES\.DOMAIN$;
server_tokens off; ## Don't show the nginx version number, a security best practice
return 301 https://$http_host$request_uri;
@@ -26,7 +26,7 @@ server {
listen [::]:443 ipv6only=on ssl http2;
## Replace this with something like pages.gitlab.com
- server_name ~^(?<group>.*)\.YOUR_GITLAB_PAGES\.DOMAIN$;
+ server_name ~^.*\.YOUR_GITLAB_PAGES\.DOMAIN$;
server_tokens off; ## Don't show the nginx version number, a security best practice
## Strong SSL Security