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.
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, changeconfig.serve_static_assets
to true.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.