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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:12:28+00:00 2026-05-25T10:12:28+00:00

I have a flask app, hosted by uwsgi , with nginx as a reverse

  • 0

I have a flask app, hosted by uwsgi, with nginx as a reverse proxy to uwsgi, using the built-in uwsgi proxy module. Whenever I visit a page that redirects to another page, the Location header points to a non-HTTPS URL. For example:

$ socat openssl:my-web-server:443 stdio
GET / HTTP/1.0
Host: my-web-server

HTTP/1.1 302 FOUND
Server: nginx/1.0.4
[...]
Location: http://my-web-server/login

My nginx config looks like this:

server {
    listen 80;
    listen 443 ssl;
    server_name my-web-server;
    charset utf-8;

    ssl_certificate /etc/nginx/certs/server.pem;
    ssl_certificate_key /etc/nginx/certs/server.key;

    location / {
        uwsgi_pass unix:/tmp/uwsgi.sock;
        include uwsgi_params;
    }
}
  • 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-25T10:12:29+00:00Added an answer on May 25, 2026 at 10:12 am

    uwsgi needs to be passed the scheme (http or https) used to serve the request in order to write the correct Location header.

    By default a bunch of settings are set in the /etc/nginx/uwsgi_params file. The include uwsgi_params; line in the config file is what load these.

    For whatever reason, though, the scheme is not one of these default settings. This can be fixed by adding:

    uwsgi_param UWSGI_SCHEME $scheme;
    

    to the nginx configuration after the include uwsgi_params; line, or by adding it to the /etc/nginx/uwsgi_params file directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that consists of two frames: one being a flash app,
I have written a small webapp using the flask framework that involves plotting using
I have a flash app hosted at www.example.com that is trying to pull in
I have a flash app that plays movies. It loads subtitles and subtitle times
I have a Flash app with a PHP backend. Whenever there is a PHP
I have a flash app using the flex framework - I would like to
I've seen a few sites that have a flash app which takes video from
I have been wanting to learn to write a Flash app so that it
I have a flash 8 app that's reading an XML file. In the file
I'm calling into a flash app embedded in a html page using the ExternalInterface.

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.