I cannot fix the icons on Gitlab bring proxied by Apache 2.4. My failure may be because I am not using passenger (passenger provided its own set of problems that were much deeper), but I took all the steps in running it under a proxied /gitlab
. I also ran:
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/gitlab
I restarted Apache as well. No improvement. The icons were still missing (or I should say the font woff
file returns status 200
to the browser but with a size of 0). This is Gitlab 6.5. In my Apache SSL sites-enabled
conf file, this is what provides an SSL route to the world to our Gitlab:
<Proxy *>
Require all granted
</Proxy>
<Location ~ /(gitlab|assets)>
RequestHeader set X_FORWARDED_PROTO 'https'
SetEnv RAILS_RELATIVE_URL_ROOT "/gitlab"
Require all granted
Options -Multiviews
# apache equivalent of nginx try files
# http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
# https://mcmap.net/q/743354/-apache2-proxypass-for-rails-app-gitlab
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8085/%{REQUEST_URI} [P,QSA]
# needed for downloading attachments but does not work under Location directive
#DocumentRoot /home/git/gitlab/public
</Location>
ProxyPass /gitlab/ http://127.0.0.1:8085/gitlab/
ProxyPassReverse /gitlab/ http://127.0.0.1:8085/gitlab/
ProxyPass /gitlab http://127.0.0.1:8085/gitlab
ProxyPassReverse /gitlab http://127.0.0.1:8085/gitlab
# SOme of the CSS assets were not being generated with "/gitlab", so I proxy those too.
ProxyPass /assets http://127.0.0.1:8085/gitlab/assets
ProxyPassReverse /assets http://127.0.0.1:8085/gitlab/assets
Again, most of it works fine. Only the font resources return with a 0 size to the browser. Should I update the Location directive to a Directory?
Note: gitlab - icons replaced by rectangles did not help. And yes, there are other sites at the 443 port on my server so I can't just take this Apache config on its own port/domain if I don't have to. I likely just need some help understanding Apache 2.4. Am I missing anything in my Apache config?
Resources made use of: https://github.com/gitlabhq/gitlab-recipes/commit/be95bd4f9bd3244641a4c7e55eb75fcc29129ffd , https://github.com/gitlabhq/gitlabhq/issues/2365 , https://github.com/gitlabhq/gitlab-recipes/commit/c6c22b4fb68bbb6efb547cce6605dea4344ba9fe
Also failed with replacing the Location directive: Tried this, but not as successful:
Alias ^/(gitlab|assets) /home/git/gitlab/public
<Directory /home/git/gitlab/public>`
RequestHeader set X_FORWARDED_PROTO 'https'
SetEnv RAILS_RELATIVE_URL_ROOT "/gitlab"
Require all granted
Options -Multiviews
# https://mcmap.net/q/743354/-apache2-proxypass-for-rails-app-gitlab
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8085/%{REQUEST_URI} [P,QSA]
</Directory>