Trying to install GitLab on Apache on CentOS 7

Hey SuperUser community,
I’m new to this forum so I’ll make this quick.
I’m an amateur CentOS System Administrator. I’m teaching myself as I go, but I recently hit a stumbling block. I’m trying to install GitLab, but I want to install it on an Apache web server on my VPS.

I know that GitLab was built for nginx, but I honestly don’t want to use it. I was wondering how I would be able to have a setup so that

  • would retrieve the files (like index.html, folders with more files in them, etc.) in /var/www/html
  • would retrieve GitLab.

I’ve heard you’re supposed to use a virtual host, but remember, I’m still an amateur at best with this kind of stuff, so if anyone here is kind enough to make a short step-by-step guide to do this, I’d appreciate this.

Note: Before I’ve been using this guide to install GitLab, however this is for Nginx, so I was wondering if I was to use this guide but then add onto it, or if I’m going about this all wrong.

I just wiped my VPS so I can start again. I know how to install LAMP, Git, and all that, so please tell me at what point in this ‘step-by-step’ guide I should.

Thanks a bunch,


I have run Gitlabs before but never with Apache, however a quick Google search revealed a dearth of information. In general it looks like you need to install Gitlabs and Apache, edit the Gitlabs config, add the Apache user to the Gitlabs group, create a VirtualHosts file so that Apache will host Gitlabs instead of nginx, enable the new VirtualHosts file, modify Apache if necessary, and restart Apache and Gitlabs if necessary. These links[1] [2] [3] [4] [5] go into much greater detail and should help you.

Source : Link , Question Author : Miles Jefferson , Answer Author : torchhound

Leave a Comment