Virtual hosts on gitlab one-click install image.

Posted January 25, 2015 6.5k views

I am trying to host two different sites on the one-click install gitlab instance. The domains are and is currently hosted on the one-click gitlab droplet. is currently on’s free hosting. They do not support SSL, so I want to host and on the same droplet. Since the version of nginx installed by omnibus is not actually recognized by apt-get, nor does it point to the /var/www directory, I have no idea how to even start this!

Any/all help would be greatly appreciated!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Some settings for components managed as part of GitLab’s omnibus install can be configured in /etc/gitlab/gitlab.rb They have been slowly adding more and more support for advanced configurations. See this doc for more information on how to configure Nginx settings through it.

The simplest way to do what you are after is probably to add a custom include directive. This will allow you to set up a separate Nginx config file for “” In /etc/gitlab/gitlab.rb add:

external_url ""
nginx['custom_nginx_config'] = "include /etc/nginx/conf.d/*.conf;"

You can now create a server block for your main site in the /etc/nginx/conf.d/ directory. Then run gitlab-ctl reconfigure to pick up the changes.

You can also disable the bundled Nginx all together and install the distro version if you want by adding:

nginx['enable'] = false