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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:42:15+00:00 2026-06-11T03:42:15+00:00

I have 2 servers. First (domain.com) is a django/apache server, second (f1.domain.com) is a

  • 0

I have 2 servers. First (domain.com) is a django/apache server, second (f1.domain.com) is a file server (nginx). Some files are protected and should only be allowed to be downloaded by registred users. To that end I have setup a nginx server with a

server {
        listen 80 default_server;
        server_name *.domain.com;
        access_log /home/domain/logs/access.log;
        location /files/ {
             internal;
             root /home/domain;
        }
}

and from Django I send a request via X-Accel-Redirect header, but it doesn’t work. I think because the request comes from a remote server.

How can I accomplish this task?

  • 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-11T03:42:17+00:00Added an answer on June 11, 2026 at 3:42 am

    “and from django I send a request via X-Accel-Redirect header” — it’s incorrect, the “X-Accel” header must be a part of response header from the upstream server.

    As http://wiki.nginx.org/X-accel said, there must be a proxy_pass or fastcgi_pass directive to send the response header to nginx.

    location /protected_files { 
        internal;
        proxy_pass http://127.0.0.2; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a htaccess file shared by dev.server and server.site.com. The first domain
I have a URL: www.domain.com/first/second/last/ How do I get the last term between slashes?
We installed IIS on two servers. On the first server we have access to
I have 2 virtual directory on my IIS (first for server developing and second
I have a server that already has a domain, lets say mysite.com but i
Hi I have 2 domains , egmahdi.com and 4xstats.com The first domain which I
I have just uploaded my first 'website' (html+js) to a web server, and my
I have been investigating about creating a UDP server, at first i though i
I have an activity which needs to make two remote server calls. The first
I have tried this example http://www.bennadel.com/blog/1056-ColdFusion-CFPOP-My-First-Look.htm , but it retrieve emails from POP server.

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.