►
From YouTube: Enabling GitLab Pages for a Single Domain
Description
This post aims to describe how you can avoid needing a wildcard certificate and DNS entry for GitLab Pages while still enabling its functionality.
#gitlab_pages
A
If
you're
unfamiliar
with
gitlab
page's
offering
it
is
a
capability
within
gitlab
that
allows
you
to
build
and
publish
static
sites,
so
sites
that
are
built
typically
using
a
static
site
generator
and
not
utilizing
any
sort
of
server
side
componentry
and
which
allows
you
to
serve
up
sites
through
html,
css
and
javascript
and
how
it
how
it
works
within
gitlab
is
you
can
create
a
sample
project
and
utilizing
a
template
or
from
other
another
project
or
build
something
yourself.
A
You
can
run
a
pipeline
on
that
project
and
it
will
automatically
publish
a
static
site
for
you,
so
that
when
you,
you
can
then
visit
that
this
is
enabled
by
default
on
gitlab.com
for
self-managed
users.
However,
it's
important
to
to
be
able
to
set
this
up
and
how
this
construct
works.
Is
this
say
that
you
have
a
page's
domain
of
gitlab.io,
which
is
the
the
domain?
A
That's
used
for
gitlab.com
static
sites,
and
you
have
a
top
level
group
name
within
your
get
lab
projects
within
your
gitlab
instance
called
artemis,
and
you
have
a
project
name
within
artemis
called
wiki.
What
will
happen?
Is
this
top
level
group
name?
Will
prepend
the
the
get
lab.io
and
the
wiki
will
then
be
appended
at
the
end
of
that
as
a
part
of
the
project
path,
so
the
full
url
for
pages
would
then
be
artemis.gitlab.io
forward,
slash
wiki
for
your
gitlab.com
instance.
This
would
be
gitlab.com
forward.
A
Setting
up
get
lab
pages,
we
have
a
few
different
options.
All
of
them
typically
require
that
wildcard
domain,
because
we
don't
know
the
names
of
your
top
level
groups
of
in
what
they're
going
to
be
called.
So
we
want
to
account
for
all
groups
being
set
up
accordingly.
Sometimes,
however,
our
customers
need
to
they
don't
have
access
to
either
provisional
wildcard
dns
entry
or
they
don't
have
access
to
provision
a
wildcard
ssl
certificate.
A
A
Within
our
gitlab
configuration,
so
this
right
now
we're
looking
at
the
gitlab.rb
file
and
there's
a
section
dedicated
to
get
lab
pages
that
you
can
navigate
to,
and
I've
uncommented
and
added
to
or
modified
two
lines.
This
page's
external
url
and,
interestingly
enough,
I'm
I'm
providing
a
top
level
domain,
because
gitlab
is
going
to
assume
that
it
has
full
access
to
all
all
sub
domains.
A
part
of
this
top
level
domain.
A
But
if
you
wanted
to,
you
could
also
use
a
sub
sub
domain,
which
would
then
have
access
to
all
of
their
sub
sub
domains,
but
again,
remember
that
what
we're
going
to
do
is
we're
only
going
to
provision
a
single
sub
domain
here
called
pages.1008.com,
and
we're
also
going
to
enable
it
on
this
second
line
here,
as
I'm
using
the
docker
instance
of
of
gitlab.
A
So
here
you
can
see
two
sample
projects
I'll
take
a
look
at
this
wiki
project
within
here.
I
copied
this
from
that
template
and
you
can
actually
see
the
the
static
site
pages
page
for
this.
A
A
One
of
them
is
that
job
that
was
created,
but
gitlab
pages
when
it
is
enabled
you
will
see
this
pages
deploy
in
it.
It
copied
over
the
content
generated
here
into
the
the
get
lab
pages
space.
If
this
job
runs
successfully-
and
you
do
not
see
this
job
get
created,
that
tells
me
that
your
get
lab
pages
instance
is
not
set
up
correctly
and
you'll.
You
need
to
troubleshoot
that
before
you
proceed,
the
gitlab
pages
administration
page
walks
you
through
how
to
how
to
set
that
up.
A
Typically
again,
it's
with
wildcard
domains,
but
for
this
particular
instance,
if
I
ping
pages.108.com,
it
is
the
only
subdomain
of
100a.com.
That's
going
to
going
to
return
this
address.
All
other
1008
queries
will
will
fail
to
resolve,
because
I
have
not
set
up
a
wild
card
for
this
particular
domain
in
action.
You
can
see
that
again.
A
But
I'm
going
to
run
this
pipeline
and
you
can
see
this
page's
job
gets
created.
But
you
see
no
pages
colon
deploy
job,
because
that
is
what
the
get
lab
pages
functionality
is
actually
driving
that
job
and
it
will
kind
of
magically
appear
within
here.