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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:34:02+00:00 2026-06-03T12:34:02+00:00

I’m trying do deploy a django project. I tried a lot of tutorials, but

  • 0

I’m trying do deploy a django project. I tried a lot of tutorials, but had no luck. I use a new clean Ubuntu 11.10. I’ve performed

apt-get install nginx
apt-get install uwsgi
service nginx start

I’ve created folder /deploy/project1 and put there manage.py and other files.

My current /deploy/project1/project1/wsgi.py contains:

import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project1.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

So, could you tell me how to deploy my django app for domain.com properly?

I’ve also installed Django via pip and easy_install

What should I add in /etc/nginx/sites-enabled/default.

  • 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-03T12:34:03+00:00Added an answer on June 3, 2026 at 12:34 pm

    Assuming that you have installed all requirement and you are using the aptitude packages then you don’t need the wsgi.py. All the configuration is in the uwsgi ini/xml/yaml file. (take the format that you prefer).

    Here is a minimal example for example.com file for nginx(/etc/nginx/sites-available/examplecom for ubuntu 11.10)

    server {
        listen      80;
        server_name example.com;
        access_log  /var/log/nginx/projectname.log;
        location /media {
            alias /vagrant/test/projectname/media/;
        }
        location /static {
            alias /vagrant/test/projectname/static/;
        }
        location / {
            uwsgi_pass unix:///run/uwsgi/projectname/socket;
            include uwsgi_params;
        }
    }
    

    Create a symbolic link to /etc/nginx/sites-enabled

    sudo ln -s /etc/nginx/sites-available/examplecom /etc/nginx/sites-enabled/examplecom
    

    or

    sudo /usr/sbin/nxensite examplecom
    

    You are done with NGINX.

    Go to /etc/uwsgi/apps-available and create your ini file

    sudo vim /etc/uwsgi/apps-available/projectname.ini
    
    [uwsgi]
    virtualenv=/home/vagrant/.virtualenvs/projectenv
    thread=3
    master=1
    env = DJANGO_SETTINGS_MODULE=projectname.settings
    module = django.core.handlers.wsgi:WSGIHandler()
    chdir = /path/to/my/django/project
    socket = /run/uwsgi/projectname/socket
    logto = /var/log/uwsgi/projectname.log
    

    Point your ini to /etc/uwsgi/apps-enabled/projectname.ini

    sudo ln -s /etc/uwsgi/apps-available/projectname.ini /etc/uwsgi/apps-enabled/projectname.ini
    

    For more information, see any of these files on your system:

    /etc/uwsgi/apps-available/README
    /etc/uwsgi/apps-enabled/README
    /usr/share/doc/uwsgi/README.Debian.gz
    /etc/default/uwsgi
    

    You are done. You can now restart nginx & uwsgi

    sudo service nginx restart
    sudo service uwsgi restart
    

    Cheers!

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I need to clean up various Word 'smart' characters in user input, including but
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.