How to set up Gitlab with SSL Correctly?

Hello, so I followed this guide here to set up Gitlab here.

The problem comes with setting up SSL. You see, I followed this guide here to generate an SSL certificate which worked when I was setting up NextCloud.

Thing is, majority of the guides tell me how to set up Gitlab with Lets Encrypt (such as here) when I want to set up a self-signed SSL (which I did in that guide).

The thing is, the files I get when making the self-signed certificates (apache-selfsigned.key, apache-selfsigned.crt, dhparam.pem) are not the same of the ones I need (cert.pem, chain.pem, fullchain.pem, privkey.pem)

Anyone can helo me setup Gitlab using a self-signed ceritificate? I can make another self-signed certificate if needed

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.

Hi @sailer403, looking at your pastebin, you need to set the following settings:

nginx['ssl_certificate'] = "/path/to/apache-selfsigned.crt"
nginx['ssl_certificate_key'] = "/path/to/apache-selfsigned.key"

# a few lines later

nginx['ssl_dhparam'] = "/path/to/dhparam.pem"

Since your certificate is self signed, you do not need to build a chain of trust (CA <- intermediate CA certificate if one exists <- your certificate). You can just use your own cert by itself. Restart gitlab after editing the config and you should be all set!