Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
84ff07cd
Commit
84ff07cd
authored
Feb 22, 2016
by
Achilleas Pipinellis
Committed by
James Edwards-Jones
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify NGINX server_name regex
parent
d9e3bb0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
doc/pages/administration.md
doc/pages/administration.md
+5
-5
lib/support/nginx/gitlab-pages
lib/support/nginx/gitlab-pages
+1
-1
lib/support/nginx/gitlab-pages-ssl
lib/support/nginx/gitlab-pages-ssl
+2
-2
No files found.
doc/pages/administration.md
View file @
84ff07cd
...
...
@@ -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
...
...
lib/support/nginx/gitlab-pages
View file @
84ff07cd
...
...
@@ -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;
...
...
lib/support/nginx/gitlab-pages-ssl
View file @
84ff07cd
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment