mirror of
https://github.com/gitlabhq/gitlab-recipes.git
synced 2026-01-09 14:37:57 -05:00
1.6 KiB
1.6 KiB
Caddy
This is an example configuration of how to use GitLab with caddy.
GitLab
Updating GitLab Configuration
Open /etc/gitlab/gitlab.rb using your favourite text editor and update the following values.
- Change
external_urlto the https protocol - Change
gitlab_workhorse['listen_network']from"unix"to"tcp" - Change
gitlab_workhorse['listen_addr']from"/var/opt/gitlab/gitlab-workhorse/socket"to"127.0.0.1:8181" - Add whatever user caddy runs under to
web_server['external_users']unless root - Change
nginx['enable'] = "true"tonginx['enable'] = "false" - Save and exit the configuration file and run
gitlab-ctl reconfigureto update gitlabs configuration
Issues
With some repository you can get the following error
in order to fix ensure to modify this line in /etc/gitlab/gitlab.rb
nginx['custom_gitlab_server_config'] = 'proxy_buffering off;'- Save and exit the configuration file and run
gitlab-ctl reconfigureto update gitlabs configuration
Updating the Caddyfile
Simply change gitlab.example.com to point to your FQDN.
GitLab Pages
Updating GitLab Configuration
Change https://example.io to point to your pages domain:
pages_external_url "https://example.io"
gitlab_pages['enable'] = true
gitlab_pages['listen_proxy'] = "127.0.0.1:8090"
gitlab_pages['redirect_http'] = true
gitlab_pages['use_http2'] = true
gitlab_pages['metrics_address'] = ":9235"
Updating the Caddyfile
Simply change *.example.io to point to your pages domain (must be different from you GitLab domain).