Too-long pages_external_url creates broken NGINX configuration
Package version: gitlab-ee 8.6.7-ee.0
I upgraded from Gitlab CE 8.6.6 to Gitlab EE 8.6.7 to take advantage of Gitlab pages. Reconfigured gitlab.rb to enable pages, as below, and ran gitlab-ctl reconfigure
# gitlab.rb
# ...
pages_external_url "http://gitlab-pages.bytemark.co.uk"
gitlab_pages['enable'] = true
# ...
pages_nginx['enable'] = true
The omnibus-managed NGINX process refused to start from the newly-generated configuration, with the message:
[emerg] 32183#0: could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
Relevant NGINX documentation:
The issue appears to be that the server_name regexp in /var/opt/gitlab/nginx/conf/gitlab_pages.conf is too long for the default bucket size. It comes to 42 bytes in my setup.
I added "server_names_hash_bucket_size 64;" to the generated configuration and this allowed NGINX to start again.