server {
  listen 51000;
  server_name <%= domain %>;

  root <%= current_path %>/public;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= shared_path %>/log/access.log combined;
  error_log <%= shared_path %>/log/error.log;

  # Serve this rails site with Passenger.
  passenger_enabled on;
  passenger_base_uri /;

  # Set the current environment.
  rails_env <%= rails_env %>;
}

<% if(rails_env == "production") %>
# Pre-start the rails app.
passenger_pre_start http://<%= domain %>:51000/;
<% end %>

server {
  listen 51000;
  server_name <%= domain %>;

  root <%= current_path %>/public;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= shared_path %>/log/access.log combined;
  error_log <%= shared_path %>/log/error.log;

  # Serve this rails site with Passenger.
  passenger_enabled on;
  passenger_base_uri /;

  # Set the current environment.
  rails_env <%= rails_env %>;

  # Allow for larger request bodies to allow for huge documentation pages.
  client_max_body_size 10m;
}

<% if(rails_env == "production") %>
# Pre-start the rails app.
passenger_pre_start http://<%= domain %>:51000/;
<% end %>

Fix big documentation pages failing to save in the admin by allowing nginx to accept bigger request bodies.
Fix big documentation pages failing to save in the admin by allowing nginx to accept bigger request bodies.
