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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:30:24+00:00 2026-06-09T06:30:24+00:00

my nginx conf: location / { include uwsgi_params; uwsgi_param UWSGI_PYHOME /usr; uwsgi_pass unix:/var/run/uwsgi-python/uwsgi/socket; uwsgi_param

  • 0

my nginx conf:

location / {
    include uwsgi_params;
    uwsgi_param UWSGI_PYHOME /usr;
    uwsgi_pass unix:/var/run/uwsgi-python/uwsgi/socket;
    uwsgi_param UWSGI_CHDIR /var/www/my_site;
    uwsgi_param UWSGI_SCRIPT my_site:app;
    uwsgi_param SERVER_NAME my_site;
    uwsgi_param UWSGI_SETENV DEPLOY_VERSION=Development;
}

my uwsgi para:

/usr/local/bin/uwsgi --master --processes 2 --logdate --chmod-socket=666 --uid www --gid www --limit-as 512 --harakiri 60 --max-requests 1000 --no-orphans —-reload-os-env --daemonize /var/log/uwsgi-python/uwsgi.log --pidfile /var/run/uwsgi-python/uwsgi/pid --socket /var/run/uwsgi-python/uwsgi/socket --xmlconfig /etc/uwsgi-python/apps-enabled/uwsgi.xml

uwsgi xml:

<uwsgi>
<master/>
<vhost/>
<memory-report/>
<no-site/>
</uwsgi>

In my flask app

print os.environ.get('DEPLOY_VERSION', 'NONE')  #pring NONE

How I can get the env_vars?

Maybe I can not get the env_vars setting by UWSGI_SETENV in <vhost/><no-site/> mode?

btw: How you deploy multi version(Development/Beta/Release) of app in one machine without virtual env?

  • 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-09T06:30:27+00:00Added an answer on June 9, 2026 at 6:30 am

    Instead of:

    uwsgi_param UWSGI_SETENV DEPLOY_VERSION=Development;

    You could set it as a per request variable in nginx: uwsgi_param DEPLOY_VERSION 'Development';

    And then within Flask, access the variable via request.environ: request.environ['DEPLOY_VERSION']

    (I had a similar problem and was pointed to the above solution on the uwsgi mailing list)

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

Sidebar

Related Questions

in nginx conf file,i use: location ~ \.jsp { proxy_pass http://127.0.0.1:86; } to parse
I am using nginx + unicorn in linode. This is my nginx.conf upstream unicorn
I've tried almost everything. In my nginx.conf I have rails_env set to production in
I'm a little bit lost here. In my nginx conf file I want a
I'm using IPB forums. I managed to use friendly urls with nginx server conf
I need to run my development through nginx due to some complicated subdomain routing
In my nginx.conf I have this line in my server {} section: log_format debug
I have two paths: /etc/nginx/sites-enabled /opt/nginx/conf/nginx.conf Both contain an .conf file, is it possible
I have Nginx with Passenger. In nginx.conf I have line: user pass users; and
I want to run nginx on my Ubuntu 10.04 32bit Linode VPS. sudo chown

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.