Linux OpenSSL Certificate for Gitlab

This is a small tutorial of creating a self-signed OpenSSL certificate.

Create a private key:
>> openssl genrsa -des3 -out gitlab.domain.key 2048

Create request:
>> openssl req -new -key gitlab.domain.key -out gitlab.domain.csr
Fill out form:
--> 'Server Hostname': your gitlab.domain
--> skip 'Challenge Password'
--> skip 'Optional Company Name'

Clear pass phrase:
>> cp -v gitlab.domain.{key,original}
>> openssl rsa -in gitlab.domain.original -out gitlab.domain.key
>> rm -v gitlab.domain.original

Create certificate:
>> openssl x509 -req -days 1460 -in gitlab.domain.csr -signkey gitlab.domain.key -out gitlab.domain.crt
>> rm -v gitlab.domain.csr

Change file permissions:
>> chmod 600 gitlab.domain.*