FS#53746 - [gitlab] Not functional example config for nginx
Attached to Project:
Community Packages
Opened by DeLord (DeLord) - Friday, 21 April 2017, 16:59 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 10 August 2017, 21:09 GMT
Opened by DeLord (DeLord) - Friday, 21 April 2017, 16:59 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 10 August 2017, 21:09 GMT
|
Details
Hi,
the example config for nginx(-ssl) is not working with the default (basic) setup which is being described in the ArchWiki. Link to example config: https://git.archlinux.org/svntogit/community.git/tree/trunk/nginx-ssl.conf.example?h=packages/gitlab The problem is that in /usr/share/webapps/gitlab/config/environments/production.rb we have the following by default: config.serve_static_files = false But the example nginx config is passing all traffic to gitlab-workhorse, which then doesn't serve static files. Either serve_static_files needs to be set to true, or (as I'd suggest) we need a block like this in the nginx(-ssl) example configs: location ~ ^/(assets)/ { root /usr/share/webapps/gitlab/public; gzip_static on; # to serve pre-gzipped version expires max; add_header Cache-Control public; } |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Thursday, 10 August 2017, 21:09 GMT
Reason for closing: Won't fix
Thursday, 10 August 2017, 21:09 GMT
Reason for closing: Won't fix
This is what I use and I find it pretty suitable. However, I tend to use socket files for everything, except nginx.
EDIT: Sorry, I just saw you mentioned static files. Perhaps my config won't be suitable for you after all.