Embed listener for proxy to make it usable for other reverse proxys besides the embedded one
I run an apache instance as reverse proxy in front of all my docker containers. Having the dependency to nginx in gitlab-pages init script makes the setup complicated and not that easy to integrate in some other infrastructure.
- You need to have nginx enabled
- You need to have pages_external_url configured to HTTP not HTTPS (otherwise it will look for certificates and make the whole container fail)
- You need to activate the proxy listener
Especially 1. and 2. took me some hours of trial and error to find out.
After change:
graph LR
A[Apache]-->B[Gitlab Pages Daemon Proxy Listener]
Merge request reports
Activity
Thanks for the merge request @maxmeyer. You'll want to enable shared runners for your fork in order for specs to run. See the note in our Contributing guide about how to enable those.
added Community contribution Category:Pages labels
mentioned in merge request !2535 (merged)
MR submitted with docs: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19734
added 188 commits
-
92b3a191...073a47dc - 186 commits from branch
gitlab-org:master
- 05bc3e25 - Embed listener for proxy to make it usable for other reverse proxys besides the embedded one
- bac435a3 - Add line of documentation to template
-
92b3a191...073a47dc - 186 commits from branch
Nope, this looks good. Thanks @maxmeyer!
changed milestone to %11.1
assigned to @ibaum
mentioned in commit 87f873da
I'm stumbling on this while trying to setup a reverse proxy (nginx+letsencrypt) for GitLab pages.
I find it strange that the options are not aligned with other services, like the registry.
It was very easy to setup:
external_url 'https://${GITLAB_HOST}' registry_external_url 'https://${REGISTRY_HOST}' nginx['listen_port'] = 80 registry_nginx['listen_port'] = 80 nginx['listen_https'] = false registry_nginx['listen_https'] = false
I thought that using the same pattern for pages would work, eg.:
pages_external_url 'https://${PAGES_HOST}' pages_nginx['listen_port'] = 80 pages_nginx['listen_https'] = false
But
https://${PAGES_HOST}
redirects to the GitLab instance.I guess there was no other option (specific server), but having a separate port is not easy for complex automated setups (nginx+letsencrypt load-balancer autogeneration) as they rely on a single port per container.
Edited by Olivier Louvignesadded workflowstaging-ref label
Due to an issue the workflowstaging-ref label was incorrectly applied to this merge request. Re-setting back to workflowproduction using
https://gitlab.com/gitlab-org/release-tools/-/merge_requests/1620
added workflowproduction label and removed workflowstaging-ref label