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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:34:40+00:00 2026-05-26T13:34:40+00:00

I’m very sorry for such a simple question– I’m new at WSGI development, and

  • 0

I’m very sorry for such a simple question– I’m new at WSGI development, and I’m grateful for any patience you can afford.

I made a Django app; it works great in development mode. I run:

python manage.py runserver

and then direct my browser to 127.0.0.1:8000, and voila, there is my app.

From here I absolutely cannot figure out how to run my app in production mode. I’ve read several pages like this and this and several others on StackOverflow. But I have no idea of where to even direct my browser to see if my page is working.

I’ve installed apache2, mod_python, etc., but I think the problem is that my misunderstanding is at such a more basic level. When I’ve done CGI programs in the past, I direct my browser to webroot/file.html with a form that calls cgi-bin/file.cgi, which generates html output. I don’t know if I am supposed to navigate to a .wsgi page, etc.

Under the assumption that I’m supposed to navigate to a .wsgi file, I’ve also tried making a file containing:

import os
import sys

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

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

path = '/home/orserang/nonparametric-protein/src/www/mysite$'
if path not in sys.path:
        sys.path.append(path)

and added

WSGIScriptAlias / /path/to/mysite/apache/django.wsgi

to my apache2/httpd.conf file, so that its contents are:

<Location "/mysite/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonOption django.root /mysite
    PythonDebug On
    PythonPath "['/home/orserang/nonparametric-protein/src/www/mysite'] + ['/home/orserang/nonparametric-protein/src/'] + sys.path"
    WSGIScriptAlias /mysite /home/orserang/nonparametric-protein/src/www/mysite/django.wsgi
</Location>

But when I restart apache, it says:

Syntax error on line 8 of /etc/apache2/httpd.conf:
WSGIScriptAlias not allowed here

Given that I don’t even know where I should point my browser to get to a Django wsgi page, I figured there is something easy that I’m doing quite wrong.

Perhaps Django WSGI apps require something to run in the background, which will listen for requests (rather than go through apache)?

The online Django documentation on views and databases alone are substantial compared to the documentation for deployment; therefore, my best guess is that this is such a simple thing to do.

Thanks a lot 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-05-26T13:34:40+00:00Added an answer on May 26, 2026 at 1:34 pm

    The Django Book 2.0 has an overview about this. It’s not typically linked to in the Django docs:

    Chapter 12: Deploying Django

    Look at the “Using Django with Apache and mod_python” section.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
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
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I am doing a simple coin flipping experiment for class that involves flipping a
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.