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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:55:04+00:00 2026-06-10T10:55:04+00:00

Im having a weird issue with a django project called satchmo, Im deploying with

  • 0

Im having a weird issue with a django project called satchmo, Im deploying with nginx and uwsgi.

Whats happening is that the application does respond and it redirects to https and then to http and back to https until nginx stops and the application never responds.

Help me figure out this. Thank you!

this is my sites-available config file for nginx:

server {
   listen 80;
   server_name miche.maumercado.com;
   rewrite      ^ https://$server_name$request_uri? permanent;
}

server {
        listen 443;
        charset utf-8;
        server_name miche.maumercado.com;
        ssl on;
        ssl_certificate /home/ubuntu/test.pem;
        ssl_certificate_key /home/ubuntu/cert-EO5rjY;
        access_log /home/ubuntu/logs/miche/nginx/access.log;
        error_log /home/ubuntu/logs/miche/nginx/error.log;
        client_max_body_size 100m;
        location ^~ /static/ {
                alias /home/ubuntu/django-projects/miche_store/static-collect/;
                expires max;
        }

        location ^~ /media/ {
                alias /home/ubuntu/django-projects/miche_store/media/;
                expires max;
        }

        location / {
                uwsgi_pass unix:/tmp/uwsgi_miche.sock;
                include /etc/nginx/uwsgi_params;
        }

}

This is the uwsgi.conf file in /etc/init:

# file: /etc/init/uwsgi_miche.conf
description "uWSGI starter"

start on (local-filesystems and runlevel [2345])
stop on runlevel [016]

respawn

# home - is the path to our virtualenv directory
# pythonpath - the path to our django application
# module - the wsgi handler python script

exec /home/ubuntu/ve/miche_store/bin/uwsgi \
--uid ubuntu \
--pythonpath /home/ubuntu/django-projects/miche_store \
-H /home/ubuntu/ve/miche_store \
--socket /tmp/uwsgi_miche.sock \
--chmod-socket 644 \
--module wsgi \
--logdate \
--optimize 2 \
--processes=6 \
--max-requests=5000 \
--master \
--vacuum \
--logto /home/ubuntu/logs/miche/uwsgi.log

And heres my wsgi.py file:

import os
import sys
import site

site.addsitedir('/home/ubuntu/ve/miche_store/lib/python2.6/site-packages')
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
sys.path.append(os.path.join(os.path.realpath(os.path.dirname(__file__)), '../'))

os.environ['DJANGO_SETTINGS_MODULE'] = 'miche_store.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Thank you all for your help!

  • 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-10T10:55:05+00:00Added an answer on June 10, 2026 at 10:55 am

    Satchmo includes a piece of middleware called satchmo_store.shop.SSLMiddleware.SSLRedirect, which automatically does redirecting to SSL/non-SSL portions of the site. You have to set up URLs to be served via SSL if you want them to be served via SSL, otherwise the middleware redirects to a non-SSL page. From the docs:

    This middleware answers the problem of redirecting to (and from) a SSL secured path
    by stating what paths should be secured in urls.py file. To secure a path, add the
    additional view_kwarg ‘SSL’:True to the view_kwargs.

    For example

    urlpatterns = patterns('some_site.some_app.views',
        (r'^test/secure/$','test_secure',{'SSL':True}),
         )
    

    All paths where ‘SSL’:False or where the kwarg of ‘SSL’ is not specified are routed
    to an unsecure path.

    For example

    urlpatterns = patterns('some_site.some_app.views',
        (r'^test/unsecure1/$','test_unsecure',{'SSL':False}),
        (r'^test/unsecure2/$','test_unsecure'),
         )
    

    In your case, since you’re serving the entire site via SSL, you can probably just disable that middleware in your settings.py file.

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

Sidebar

Related Questions

Having a weird issue with MemoryError in my Django project. Ubuntu 11 Apache2 Nginx
I'm having a weird issue that I can't track down... For context, I have
Having a weird issue. I'm new to Macs and have a windows VM that
I am having a weird issue with my profiles. For my project, i have
I'm having a weird issue with my Silverlight 4 project, although it's one I've
I having a weird issue with Django 1.3. When I try to add a
I'm having a weird issue when consuming a webservice for a product that my
I'm having a weird issue that I can't find any reference to on SO
I am having a weird issue with CSS that will has to be simple
I'm having a weird issue with a button that is being shown on screen,

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.