carrierwave_with_nginx.md Carrierwave + nginx X-Accel-Redirect nginx.conf location /protected { internal; alias /var/www/myapp/current/protected; } location / { proxy_set_header X-Sendfile-Type X-Accel-Redirect; proxy_set_header X-Accel-Mapping (/var/www/myapp/current|/var/www/myapp/releases/[\d]+)/protected/=/protected/; # ... } .gitignore # Ignore Carrierwave upload files. /protected config/envi
![Carrierwave + nginx X-Accel-Redirect](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)