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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:02:10+00:00 2026-05-15T11:02:10+00:00

I am deploying a Django project on apache server with mod_python in linux. I

  • 0

I am deploying a Django project on apache server with mod_python in linux. I have created a directory structure like:
/var/www/html/django/demoInstall where demoInstall is my project. In the httpd.conf I have put the following code.

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

</Location>

It is getting me the django environment but the issue is that the urls mentioned in urls.py are not working correctly.

In my url file I have mentioned the url like:

 (r'^$', views.index),

Now, in the browser I am putting the url like : http://domainname/django/demoInstall/ and I am expecting the views.index to be invoked. But I guess it is expecting the url to be only: http://domainname/ .

When I change the url mapping to:

  (r'^django/demoInstall$', views.index),

it works fine. Please suggest as I do not want to change all the mappings in url config file.

Thanks in advance.

  • 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-15T11:02:10+00:00Added an answer on May 15, 2026 at 11:02 am

    There’s a fairly simple way around this using just django, without having to touch apache.

    Rename your urls.py to something else, e.g. site_urls.py

    Then create a new urls.py which includes that

    from django.conf.urls.defaults import *
    
    urlpatterns = patterns('',
        (r'^django/demoInstall/', include('site_urls.py')),
    )
    

    This will ensure that all the url reversing continues to work, too.

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

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer DNS lookups are cached on multiple levels - by nameservers,… May 16, 2026 at 4:43 pm
  • Editorial Team
    Editorial Team added an answer Your text boxes hold a reference to the first instance… May 16, 2026 at 4:43 pm
  • Editorial Team
    Editorial Team added an answer This is a character encoding problem, not a font embedding… May 16, 2026 at 4:43 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Aside from not deploying a Django project to the web site root directory, is
I just moved a django project to a deployment server from my dev server,
I need to have an at-home project now that I'm working on Python/Django at
I have a client's Django project that I'm developing locally, using Mercurial for version
To deploy a site with Python/Django/MySQL I had to do these on the server
I am working on a Django project. And our team follows agile practices(TDD,very short
So I am applying zc.buildout to an existing django project. I am wondering about
I'm deploying a simple Java app to Google App Engine. I have a simple
So I have got my Maven build deploying both Java5 and Java6 versions to
as a personal project I am trying to write a wiki with the help

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.