Ubuntu 18 Upgrade 403 Forbidden

I upgraded our local gitlab server from 16 to 18. Everything worked perfectly except that the web interface for gitlab does not work. Everything is still there and setup but I get a 403 Forbidden when I go to the site. I have googled and tried all that I have found with no luck. Any ideas would be great!


You don’t have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Apache/2.4.29 (Ubuntu) Server at Port 80

Hi and welcome to the GitLab forum! :slight_smile:

There is something that caught my eye in your post: you are showing an error from Apache, but GitLab, by default, runs on nginx.

  • Is this something you changed? It could be that after the upgrade to Ubuntu 18.04 a dormant Apache server was started, “stealing” access to port 80?
  • More importantly, is GitLab actually running? Any error logs that you might want to share?
  • Which version of GitLab are you running and how did you install it? E.g. .deb package, omnibus… etc
1 Like

Yes gitlab is running see below.

Take back control of port 80 from Apache and give it to nginx?

run: alertmanager: (pid 17558) 146342s; run: log: (pid 1654) 151251s
run: gitaly: (pid 17574) 146342s; run: log: (pid 1674) 151250s
run: gitlab-monitor: (pid 17589) 146342s; run: log: (pid 1672) 151251s
run: gitlab-workhorse: (pid 17608) 146341s; run: log: (pid 1663) 151251s
run: logrotate: (pid 30368) 2339s; run: log: (pid 1676) 151250s
run: nginx: (pid 5729) 2s; run: log: (pid 1658) 151251s
run: node-exporter: (pid 17704) 146340s; run: log: (pid 1653) 151251s
run: postgres-exporter: (pid 17711) 146340s; run: log: (pid 1667) 151251s
run: postgresql: (pid 17723) 146339s; run: log: (pid 1648) 151251s
run: prometheus: (pid 17731) 146338s; run: log: (pid 1655) 151251s
run: redis: (pid 17747) 146338s; run: log: (pid 1664) 151251s
run: redis-exporter: (pid 17752) 146338s; run: log: (pid 1673) 151251s
run: sidekiq: (pid 17765) 146335s; run: log: (pid 1647) 151251s
run: unicorn: (pid 17777) 146334s; run: log: (pid 1668) 151251s

Found the answer! Thank you!

I had to do the following commands to stop apache and start nginx.
sudo systemctl stop apache2
sudo systemctl mask apache2
sudo systemctl unmask nginx
sudo systemctl enable nginx
sudo systemctl restart nginx

1 Like

Awesome, glad you could solve it! Thanks for posting the solution to help other forum members! :+1:

1 Like