Commit 2171a880 authored by Joerg Behrmann's avatar Joerg Behrmann

Fix source installation docs and init script for gitlab-pages

Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/337419
parent 91a03c2f
...@@ -127,17 +127,43 @@ The Pages daemon doesn't listen to the outside world. ...@@ -127,17 +127,43 @@ The Pages daemon doesn't listen to the outside world.
# path: shared/pages # path: shared/pages
host: example.io host: example.io
port: 80 access_control: false
port: 8090
https: false https: false
artifacts_server: false
external_http: ["127.0.0.1:8090"]
secret_file: /home/git/gitlab/gitlab-pages/gitlab-pages-secret
```
1. Add the following configuration file to
`/home/git/gitlab/gitlab-pages/gitlab-pages.conf`, and be sure to change
`example.io` to the FQDN from which you want to serve GitLab Pages and
`gitlab.example.com` to the URL of your GitLab instance:
```ini
listen-http=:8090
pages-root=/home/git/gitlab/shared/pages
api-secret-key=/home/git/gitlab/gitlab-pages-secret
pages-domain=example.io
internal-gitlab-server=https://gitlab.example.com
```
You may use an `http` address, when running GitLab Pages and GitLab on the
same host. If you use `https` and use a self-signed certificate, be sure to
make your custom CA available to GitLab Pages, for example by setting the
`SSL_CERT_DIR` environment variable.
1. Add the secret API key:
```shell
sudo -u git -H openssl rand -base64 32 > /home/git/gitlab/gitlab-pages-secret
``` ```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in 1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the order to enable the pages daemon:
`-pages-domain` must match the `host` setting that you set above.
```ini ```ini
gitlab_pages_enabled=true gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
``` ```
1. Copy the `gitlab-pages` NGINX configuration file: 1. Copy the `gitlab-pages` NGINX configuration file:
......
...@@ -44,7 +44,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log" ...@@ -44,7 +44,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
gitlab_pages_enabled=false gitlab_pages_enabled=false
gitlab_pages_dir=$(cd $app_root/../gitlab-pages 2> /dev/null && pwd) gitlab_pages_dir=$(cd $app_root/../gitlab-pages 2> /dev/null && pwd)
gitlab_pages_pid_path="$pid_path/gitlab-pages.pid" gitlab_pages_pid_path="$pid_path/gitlab-pages.pid"
gitlab_pages_options="-pages-domain example.com -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090" gitlab_pages_options="-config $app_root/gitlab-pages/gitlab-pages.conf"
gitlab_pages_log="$app_root/log/gitlab-pages.log" gitlab_pages_log="$app_root/log/gitlab-pages.log"
shell_path="/bin/bash" shell_path="/bin/bash"
gitaly_enabled=true gitaly_enabled=true
......
...@@ -68,7 +68,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log" ...@@ -68,7 +68,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
# The -pages-domain must be specified the same as in `gitlab.yml > pages > host`. # The -pages-domain must be specified the same as in `gitlab.yml > pages > host`.
# Set `gitlab_pages_enabled=true` if you want to enable the Pages feature. # Set `gitlab_pages_enabled=true` if you want to enable the Pages feature.
gitlab_pages_enabled=false gitlab_pages_enabled=false
gitlab_pages_options="-pages-domain example.com -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090" gitlab_pages_options="-config $app_root/gitlab-pages/gitlab-pages.conf"
gitlab_pages_log="$app_root/log/gitlab-pages.log" gitlab_pages_log="$app_root/log/gitlab-pages.log"
# mail_room_enabled specifies whether mail_room, which is used to process incoming email, is enabled. # mail_room_enabled specifies whether mail_room, which is used to process incoming email, is enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment