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

  • Home
  • SEARCH
  • 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 8012883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:28:17+00:00 2026-06-04T19:28:17+00:00

I set up nginx as a reverse proxy to Thin Rails app server. server

  • 0

I set up nginx as a reverse proxy to Thin Rails app server.

server {
    listen 82;
    server_name www.hamburgers.com;
    root /var/user_cases/user_00001/user_case_11/public;
    location ~\.* {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
    }
}

some pages open, see /var/log/nginx/access.log

127.0.0.1 - - [28/May/2012:18:33:53 +0400] "GET /assets/e.png HTTP/1.1" 304 0 "http://www.hamburgers.com:82/user_session/new" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0"
127.0.0.1 - - [28/May/2012:18:34:01 +0400] "POST /user_session HTTP/1.1" 302 113 "http://www.hamburgers.com:82/user_session/new" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0"

but some fail with such record in /var/log/nginx/error.log

2012/05/28 18:34:03 [error] 5710#0: *117 open() "/var/www/nginx-default/user_cases" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /user_cases HTTP/1.1", host: "www.hamburgers.com", referrer: "http://www.hamburgers.com:82/user_session/new"

I suppose nginx for some reason uses /var/www/nginx-default instead of www.humburgers.com for some pages. I’ve no clue why.

How can I fix that?

  • 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-04T19:28:18+00:00Added an answer on June 4, 2026 at 7:28 pm

    found solution. I should use

    proxy_set_header Host $http_host;
    

    instead of

    proxy_set_header Host $host;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

server declaration in my nginx.conf: listen 1.2.3.4:443 ssl; root /var/www/myapp/current/public; ssl on; ssl_certificate /etc/nginx-cert/server.crt;
I'm using Nginx as webserver, with a reverse proxy to a gunicorn django server.
I'm using Nginx as a reverse proxy for Thin instances. My goal is to
I have a website set up with nginx acting as a reverse proxy to
My stack looks like this nginx -> thin -> rails. In my rails app
I've set up a Rails 3 proxy method inside a controller to use Nginx'
I've set up Nginx as my main web server and have two Mochiweb based
I've just got my first VPS & have set up NGinx, Ruby, Rails &
Really basic question. Learning Django and now working on development server with nginx set
I have a webapp on a NGinx server. I set gzip on in the

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.