Report this

What is the reason for this report?

Virtual hosts on gitlab one-click install image.

Posted on January 25, 2015

I am trying to host two different sites on the one-click install gitlab instance. The domains are website.io and git.website.io. git.website.io is currently hosted on the one-click gitlab droplet. website.io is currently on mrgere.net’s free hosting. They do not support SSL, so I want to host website.io and git.website.io 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!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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 “website.io” In /etc/gitlab/gitlab.rb add:

external_url "http://git.website.io"
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

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.