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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:01:42+00:00 2026-05-27T13:01:42+00:00

Nginx, Passenger, and Rails are running beautifully on my Linode. Before I launch, I’d

  • 0

Nginx, Passenger, and Rails are running beautifully on my Linode. Before I launch, I’d like to restrict access so only my IP can view the site.

I’ve tried to deny access to all, and allow access to only my IP in Nginx. It does deny access to all, but I can’t get the allow to work. I have checked to ensure the IP address I’m specifying in nginx.conf is my correct public ip.

Here’s my nginx.conf. I’ve restarted nginx after editing the file, and tested some other changes which worked as expected (for instance, I removed deny all and was able to access the site, as expected).

What am I doing wrong?

    http {
      passenger_root /path/to/passenger-3.0.11;
      passenger_ruby /path/to/ruby;
      include       mime.types;
      default_type  application/octet-stream;
      sendfile        on;
      keepalive_timeout  65;
      gzip  on;
      server {
        listen 80;
        server_name www.foo.bar;
        root /path/to/rails/public/;
        passenger_enabled on;
        location / {
          allow   my.public.ip.here;
          deny    all;
        }
      }
    }
  • 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-27T13:01:43+00:00Added an answer on May 27, 2026 at 1:01 pm

    modify your nginx.conf

      server {
        listen 80;
        server_name www.foo.bar;
    
        location / {
          root /path/to/rails/public/;
          passenger_enabled on;
    
          allow   my.public.ip.here;
          deny    all;
        }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running Nginx 1.0.6, Passenger 3.0.9, Rails 3.1.1, Ruby 1.9. In my production
I have the latest Nginx running with Passenger, SQLite and Rails 3.1. Somehow, when
I have a ruby on rails app running on passenger / nginx. The app
I'm running a Rails 3.0.7 app with nginx and Passenger. I have a custom
I'm running nginx, Phusion Passenger and Rails. I am running up against the following
I have installed Nginx 1.2.0 with Passenger on my Mac Mini running Lion Server.
We have a website using Rails 2.3.x, bundler, nginx, passenger and git, and would
I searched google for deploying multiple rails websites using phusion passenger 3.0.17 with nginx
I've setup my website with Rails 3 and Passenger (via nginx) and, although its
I had a rails 3 app on Nginx/Passenger that I just moved to Nginx/Thin

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.