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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:22:46+00:00 2026-06-01T17:22:46+00:00

im installing django, the test for wsgi is ok, but when i point my

  • 0

im installing django,

the test for wsgi is ok, but when i point my default file to the django test, it doesnt work,

this is the test that works fine:

default: /etc/apache2/sites-available/default

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    ServerAdmin webmaster@example.com
    DocumentRoot /var/www

    <Directory /var/www/documents>
    Order allow,deny
    Allow from all
    </Directory>
    WSGIScriptAlias / /home/ubuntu/djangoProj/micopiloto/application.wsgi
    <Directory /home/ubuntu/djangoProj/mysitio/wsgi_handler.py>
    Order allow,deny
    Allow from all
    </Directory> 
</VirtualHost>

application.wsgi:: ~/djangoProj/micopiloto

import os 
import sys 

sys.path.append('/srv/www/cucus/application') 
os.environ['PYTHON_EGG_CACHE'] = '/srv/www/cucus/.python-egg' 

def application(environ, 
start_response):

     status = '200 OK'

     output = 'Hello World!MK SS9 tkt kkk'

     response_headers = [('Content-type', 'text/plain'),

                                     ('Content-Length', str(len(output)))]

     start_response(status, response_headers)


     return [output]

but if I change the default to point to application_sa.wsgi the django test,
it doesnt work 🙁

application_sa.wsgi

import os, sys

sys.path.append('/home/ubuntu/djangoProj/micopiloto') 


os.environ['DJANGO_SETTINGS_MODULE'] = 'micopiloto.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I restart the apache server every time i change the wsgi to test,

so what im i missing?

thanks a lot!

  • 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-01T17:22:48+00:00Added an answer on June 1, 2026 at 5:22 pm

    Try changing your apache config to the following:

    AddHandler wsgi-script .wsgi
    
    WSGISocketPrefix /var/run/wsgi
    WSGIRestrictEmbedded On
    
    <VirtualHost *:80>
        ServerName www.mydomain.com
    
        WSGIDaemonProcess myprocess processes=2 threads=15
        WSGIProcessGroup myprocess
    
        WSGIScriptAlias / /home/ubuntu/djangoProj/micopiloto/application_sa.wsgi
    </VirtualHost>
    

    Then add the root folder of your project to sys.path as well in application_sa.wsgi:

    sys.path.append('/home/ubuntu/djangoProj') 
    sys.path.append('/home/ubuntu/djangoProj/micopiloto') 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am installing django for my EC2 instance, but before I wanted to do
What options are there for installing Django such that multiple users (each with an
I'm using Django/Python, but pseudo-code is definitely acceptable here. Working with some models that
Will the following work: Un-installing django 1.0.2 Installing django 1.3.1 Starting a 'new' project
after installing django I tried django-admin.py startproject mysite and that worked, then I got
I got my Apache Mod_WSGI and Django working following http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/ with a twist that
Anyone had any problems with installing django 1.3 and 1.4 on the same development
Installing Merb on Ruby Enterprise Edition (OS X) throws this error, any ideas? sudo
When installing subversion as a service, I used this command: c:\>svnservice -install --daemon --root
After installing django_message I noticed django has a nice little notification system build-in (Being:

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.