# GitLab with Plesk and Let's Encrypt

This is how I installed GitLab under a subdomain on a server Running Plesk 12.5 on Ubuntu 14.04 and added a SSL certificate from Let’s Encrypt.

### Install GitLab

To install GitLab follow the instructions on the website here.

### Deactivate the bundled web-server

GitLab comes with it’s own nginx as web-server. I wanted to use the apache that is already running on the server.
In the docs is a description how to do that here

Only one thing to note: The user is the user of the Plesk webspace where GitLab should be installed and the group is psacln.

Run

when you are done.

### Configure Apache

Then I added a new subdomain to my webspace git.jonasjuffinger.com. There I opened the Apache & nginx settings. Under Additional Apache directives it is possible to add configuration for apache.

Because we will configure Let’s Encrypt later we want every request over http redirected to https, except the .well-known directory because it is needed by Let’s Encrypt: