0

I am running Gitlab reverse-proxied through an Apache 2.2 server for my work group. Recently, we wanted to upload some group logos to use as project Avatars. The uploads all completed successfully (confirmed in a directory listing through SSH), but the images never showed up - instead we just got a 404.

We are using Apache's mod_proxy to connect to a Unicorn backend.

2 Answers 2

1

Actually I had that problem too. You need to enable static assets in your config. Since Gitlab was designed to be run with Apache, they turn off Unicorn's static asset sharing. To enable it, simply run sudo -u git vim /home/git/gitlab/config/environments/production.rb and at about line 12, change config.serve_static_assets to true.

1
  • That sounds like a good solution if you can't edit the Apache config, but doing it in the Apache config puts the static assets load back on the web server instead of tying up the application server with it.
    – Moshe Katz
    Jul 23, 2014 at 20:31
0

It turns out that the Gitlab sample Apache configuration that we originally used (over a year ago) was missing the check for whether files exist before it would go back to the Unicorn server and was also missing the directives to not proxy certain directories (like /uploads), but the Unicorn server wasn't configured to serve these files.

Updating the Apache configuration to match the newest sample version fixed the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .