---
title: "因其本身有错无法显示 rails for nginx"
author: "RobinWu"
date: "2011-11-25T22:29:09Z"
tags: []
categories: ["编程语言"]
slug: "rails-for-nginx"
draft: false
lastmod: "2011-11-25T22:29:09Z"
id: 1278660
url: "https://robinwu.iteye.com/blog/1278660"
---

vi config/environments/production.rb

```java

  # Specifies the header that your server uses for sending files
  # config.action_dispatch.x_sendfile_header = "X-Sendfile"

  # For nginx:
  config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'

```