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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:17:59+00:00 2026-05-20T12:17:59+00:00

Hi All i am not able to run a django application in apache2 webserver.

  • 0

Hi All i am not able to run a django application in apache2 webserver. I have went through all the document but it still did not work for me.This is my Apache2’s httpd.conf file

<Location "/mysite/">
  SetHandler python-program
  PythonHandler django.core.handlers.modpython
  SetEnv DJANGO_SETTINGS_MODULE mysite.settings
  PythonOption django.root /mysite
  PythonPath "['/home/djangotest/mysite'] + sys.path"
  PythonDebug On
</Location>

My django project location is at /home/djangotest/mysite in which i am running the polls application. Is there something i have to mention in settings.py or urls.py for this to work in apache2 it works fine in the dev server. or is there configuration i have to do in apache2 to work

  • 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-20T12:18:00+00:00Added an answer on May 20, 2026 at 12:18 pm

    Try to add ‘/home/djangotest’ to PythonPath:

    <Location "/mysite/">
    
      SetHandler python-program
      PythonHandler django.core.handlers.modpython
      SetEnv DJANGO_SETTINGS_MODULE mysite.settings
      PythonOption django.root /mysite
      PythonPath "['/home/djangotest', '/home/djangotest/mysite'] + sys.path"
    
      PythonDebug On
    </Location>
    

    You need to add that if you import your project’s files with the syntax ..
    The other guys here are right, though; switch to mod-wsgi if you can. Django’s mod_python support will be deprecated very soon. http://docs.djangoproject.com/en/1.2/howto/deployment/modpython/

    edit: mod_python support is deprecated in Django 1.3, and will be removed entirely on Django 1.5.

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

Sidebar

Related Questions

First of all: I am not an experienced ClearCase user, but I have lots
I am reading log files but not all lines want to be processed straight
I have a Visual Studio (2008) solution consisting of several projects, not all in
In Visual c# Express Edition, is it possible to make some (but not all)
I have a Visual Source Safe repository, and some (not all, alas!) of my
First of all,I'm not into web programming. I bumped into django and read a
I have new to python and django I am creating poll application and in
I have been working on an application in Django. To begin with, for simplicity,
I've sent my iphone application to my testers and all but one complain that
Situation: Site with content protected by username/password (not all controlled since they can be

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.