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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:17:37+00:00 2026-05-25T06:17:37+00:00

I am developing a Django application which works fine locally. In production, the application

  • 0

I am developing a Django application which works fine locally. In production, the application will be served from a relative path, such as www.example.com/app/.

I am using Apache with mod_wsgi, and I have configured Apache to serve the application from the relative URL:

WSGIScriptAlias /app /path/to/my/modwsgi.py
WSGIDaemonProcess app display-name=app_wsgi

Unfortunately, I get an Error 404. The debug information, though, is pretty mysterious. If I try to get www.example.com/app/myurl/, Django says

Using the URLconf defined in apps.urls, Django tried these URL patterns, in this order:

    ^myurl/$
    ...

The current URL, myurl/, didn't match any of these.

It seems that Django – correctly – infers that the path requested is myurl/, and not app/myurl/. But, even though myurl/ clearly matches ^myurl/$, it does not find a match.

I have also tried to add the setting

FORCE_SCRIPT_NAME = '/app'

but nothing changes – the error message remains identical.

  • 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-25T06:17:38+00:00Added an answer on May 25, 2026 at 6:17 am

    The debug information lies :-/ Trying with more permissive regexs in the URL conf; iwas able to get a page. From there I could print request.path, and it turned out to be app/myurl/.

    To make it work, I had instead to put

    FORCE_SCRIPT_NAME = ''
    STATIC_URL = '/app/static/'
    MEDIA_URL = '/app/media/'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a Django application, which is a large system that requires multiple
I am in the middle of developing a Django application, which has quite complicated
I developing an application which works with Google API, according to my understanding. def
I am new to the world of Django. I am developing an application which
I'm developing an IFrame application in Facebook (using pyfacebook and Django) and could not
I'm using the Django manage.py runserver for developing my application (obviously), but it takes
As part of the application we are developing (with android client and Django server)
I am developing an application on the Google App Engine using Python (and Django,
I'm trying to decide on which architecture to choose for developing Django 1.0.x through
I am developing an issue tracking application in Django, mostly for a learning exercise

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.