Report this

What is the reason for this report?

Gitlab - Configuring Nginx file

Posted on March 14, 2015

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.