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

The Archive Base Latest Questions

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

I want to deploy Django application on nGINX server. I’m using uWSGI. I looked

  • 0

I want to deploy Django application on nGINX server. I’m using uWSGI. I looked up in many tutorials but none worked.
Django application runs perfectly as a standalone app. What is the simplest way to have the same app running on nGINX??

I’m stuck here and want a solution.. 🙁

my www folder is in /usr/share/nginx/www

my site-enabled n conf.d and all are in /etc/nginx/

I did install uWSGI but couldn’t find any folder named uwsgi which has apps-installed folder/file in it

  • 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-11T18:26:43+00:00Added an answer on June 11, 2026 at 6:26 pm

    Once you have created an dJango application. Just follow these steps:

    STEP 1. Create a file say uwsgi.ini in your Django Project Directory. i.e besides manage.py

    [uwsgi]
    # set the http port
    http = :<port_no>
    
    # change to django project directory
    chdir = <project directory>
    
    # add /var/www to the pythonpath, in this way we can use the project.app format
    pythonpath = /var/www
    
    # set the project settings name
    env = DJANGO_SETTINGS_MODULE=<project_name>.settings
    
    # load django
    module = django.core.handlers.wsgi:WSGIHandler()
    

    STEP 2. Under /etc/nginx/sites-available add .conf file

    server {
    listen 84;
    server_name example.com;
    access_log /var/log/nginx/sample_project.access.log;
    error_log /var/log/nginx/sample_project.error.log;
    
    # https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-production
    location /static/ { # STATIC_URL
        alias /home/www/myhostname.com/static/; # STATIC_ROOT
        expires 30d;
                      }
    
           }
    

    STEP 3. In nginx.conf, pass the request to your Django application

    Under the server { } block,

    location /yourapp {
               include uwsgi_params;
               uwsgi_pass <your app address, eg.localhost>:<portno>;
                       }
    

    STEP 4. Run the uwsgi.ini

    > uwsgi --ini uwsgi.ini
    

    Now any request to your nGINX will pass the request to your Django App via uwsgi.. Enjoy 🙂

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

Sidebar

Related Questions

I'm using Capistrano to deploy a Django application (it uses Nginx as the web
I developed a small Java application using EJB3 and JSF. But I want deploy
I want to deploy the application in the Windows Server 2008 R2. But I
I want to deploy the sencha touch application to native Android (apk) but when
I'm building app in django which I want to deploy on aws ec2 server.
I have a console application and I want to deploy/share it using some msi/setup.exe
I want to deploy my Symfony2 project into my server and capifony but I
I want to deploy my django app using apache + mod_wsgi again. I seem
i want to deploy my django site to apache , but i cant find
I want to deploy an app using Sinatra on Phusion Passenger w/ nginx. If

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.