Configuring nginx to serve multiples subdomains on Gitlab dropplet


I have set up a Gitlab dropplet which is working fine. I would like to leave gitlab on a specific subdomain and use nginx to server other websites too.

I already edited gitlab to answer on that subdomain ( but I don't know how to configure nginx to point the other ones. I could not find the standard sites-availables, sites-enabled folders.

Can you help me?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


gitlab installer is using chef recipe to provision ngnix. You can modify those recipies as is described here:

The GitLab one-click image uses GitLab’s “omnibus” installer. It’s designed to run in a self contained manner and installs it own libraries including Nginx under <code>/opt</code>. So you might be better off installing GitLab yourself on a clean droplet:

Hi Leto,

I’ll do my best to help you but first I just need to know some more information. Why are you unable to use the standard sites-available/sites-enabled(sites-enabled is just system links to sites available btw)

You can setup a server block like this in whatever configuration file you are using to allow another domain <pre> server { listen 80 default_server; listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html;
index index.html index.htm;

server_name localhost;

location / {
    try_files $uri $uri/ =404;

} </pre> Hope this helps…