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 8661223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:26:49+00:00 2026-06-12T16:26:49+00:00

How can I host multiple Rails apps with nginx and Unicorn? I currently have

  • 0

How can I host multiple Rails apps with nginx and Unicorn?

I currently have one site up and running thanks to “Deploying to a VPS“.

I have searched but I need a step-by-step guide to get this working. The results I found are not so well explained to help me understand how to accomplish this.

  • 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-06-12T16:26:51+00:00Added an answer on June 12, 2026 at 4:26 pm

    Basically, you do the same thing you did to get everything for your first application running minus the Nginx installation. So, however you got your Unicorn instance for your first application running, do it again for your next application.

    You can then just add another server block into your Nginx config with an upstream that points to that new Unicorn instance.

    One Nginx running for the entire machine will do fine, with one Unicorn running per application.

    Hope this helps some.


    Here is a sample of the additional server block you would need to add for Nginx to serve additional applications:

    upstream unicorn_app_x {
      server unix:/path/to/unicorn/socket/or/http/url/here/unicorn.sock;
    }
    
    server {
      listen 127.0.0.1:80;
      server_name mysitehere.com aliasfor.mysitehere.com;
      root /path/to/rails/app/public;
    
        location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
    
        if (!-f $request_filename) {
          proxy_pass http://unicorn_app_x;
          break;
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to host multiple different rails apps on the same VPS using
I know in Oracle i can have multiple homes running on the same host
I understand that one can host multiple websites on windows azure, I would like
I'm using one server to host multiple Node.js web apps, which are distributed across
is host name to ip a one-to-one mapping? how can a host name have
Can one host multiple store on Magento Community Edition? And how to automatically create
A single Biztalk Server can have multiple Host processes. Is it possible to create
I'm developing an ASP.NET MVC multi site application (can host multiple sites from the
Can I host an application in Windows Azure and have the database stored on
I am trying to build a CMS I can use to host multiple sites.

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.