Gitlab - Configuring Nginx file

March 14, 2015 1.6k views
One-Click Install Apps Linux Commands

When I try to push an existing repo to a new repo: error: RPC failed; result=22, HTTP code = 413

I did some research and it seems like I need to edit the nginx.conf to increase the client_max_body_size.

Where is the nginx.conf file for Gitlab though? I cannot seem to find it.

1 Answer

The GitLab One-Click app uses the "omnibus" version of GitLab. The full-stack required to run is GitLab managed together rather than installed as separate pieces. The configuration file is located in /etc/gitlab/gitlab.rb

In order to add a custom Nginx setting, you'll need to add something like the following to your configuration.

nginx['custom_gitlab_server_config'] = "client_max_body_size 200M;"

Then run sudo gitlab-ctl reconfigure for the change to take effect.

See the GitLab documentation for more information on configuring Nginx:

Have another answer? Share your knowledge.