Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6042603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:48:32+00:00 2026-05-23T06:48:32+00:00

I’m using Nginx as a reverse proxy for Thin instances. My goal is to

  • 0

I’m using Nginx as a reverse proxy for Thin instances.

My goal is to set up a Rails (3) app to upload large files and do something with them.

For that, I came across the Nginx Upload and Upload Progress modules.

I was reading, for the most part, this post, but that’s specifically wrote thinking in Passenger.

If possible, I’m looking for two possible answers:

1) Information an examples of implementing this stack (with Thin instead of Passenger)

2) Specific Information of how could I rewrite this:

   location ^~ /progress {
         # report uploads tracked in the 'proxied' zone
         upload_progress_json_output;
         report_uploads proxied;
       }

       location @fast_upload_endpoint {
         passenger_enabled on;
         rails_env development;
       }

       location / {
         rails_env development;
         passenger_enabled on;
       }

I don’t know what is Passenger exclusive, and how to write it for a typical 4 workers / 3 thin instances conf.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:48:32+00:00Added an answer on May 23, 2026 at 6:48 am

    First, you should install nginx with the upload module. The nginx config for site:

    upstream uploader_cluster {
      server unix:/tmp/thin.uploader.0.sock;
      server unix:/tmp/thin.uploader.1.sock;
      server unix:/tmp/thin.uploader.2.sock;
      server unix:/tmp/thin.uploader.3.sock;
      server unix:/tmp/thin.uploader.4.sock;
    }
    
    server {
         listen 80;
         server_name ***.com;
    
         charset off;
         client_max_body_size 1000m;
    
         access_log /var/www/uploader/log/access.log;
         error_log /var/www/uploader/log/error.log;
    
         root /var/www/uploader/public;
         index index.html;
    
         location / {
             proxy_redirect     off;
             proxy_set_header   Host             $host;
             proxy_set_header   X-Real-IP        $remote_addr;
             proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    
             if (-f $request_filename/index.html) {
                 rewrite (.*) $1/index.html break;
             }
    
             if (-f $request_filename.html) {
                 rewrite (.*) $1.html break;
             }
    
             if (!-f $request_filename) {
                 proxy_pass http://uploader_cluster;
                 break;
             }
         }
    
         location ~*uploads$ {
            if ($request_method = GET) {
              proxy_pass http://uploader_cluster;
              break;
            }
    
            # pass request body to here
            upload_pass @upload_photos;
    
            # Store files to this directory
            # The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should exist
            # i.e. make sure to create /vol/uploads/0 /vol/uploads/1 etc.
            upload_store /vol/uploads 1;
    
            # set permissions on the uploaded files
            upload_store_access user:rw group:rw all:r;
    
            # Set specified fields in request body
            # this puts the original filename, new path+filename and content type in the requests params
            upload_set_form_field upload[file_name] "$upload_file_name";
            upload_set_form_field upload[file_content_type] "$upload_content_type";
            upload_set_form_field upload[file_path] "$upload_tmp_path";
            upload_aggregate_form_field upload[file_size] "$upload_file_size";
    
            upload_pass_form_field "^fb_sig_user$|^aid$|^batch_id$|^album_name$|^album_visible$|^caption$|^tags$|^complete$";
    
            upload_cleanup 400 404 499 500-505;
         }
    
         location @upload_photos {
            proxy_pass http://uploader_cluster;
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I am using Paperclip to handle profile photo uploads in my app. They upload
I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm making a simple page using Google Maps API 3. My first. One marker
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.