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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:14:20+00:00 2026-06-02T18:14:20+00:00

I just set up my django in a production environment with Apache and mod_wsgi.

  • 0

I just set up my django in a production environment with Apache and mod_wsgi. Everything seems to be working great. I’ve granted access to the static folder (for admin resources) and the server is working just as expecting.

There just seems to be one weird thing when trying to view web pages that don’t match a URL through Django. When this apparent 404 is reached (I have DEBUG turned on for the moment).

This problem stems from my desire to disable directory listing within the static folder.

I added the Options -Indexes argument and it seems to have worked.

The only issue is that the apache rewrite engine seems to, when it cannot find the resource (or the resource is a folder) it appends 404.shtml to the URL. But append isn’t quite the right word. Instead, it replaces the last 9 characters of the request URL with 404.shtml. Then my Django 404 debug screen comes up and there’s a nonsensical version of my original request.

Here’s an example:

Request URL:
http://mobile.mywebsite.com/static/unknown_file

Django receives:

Page not found (404)
Request Method: GET
Request URL: http://mobile.mywebsite.com/static/un/404.shtml

However, if instead I request
http://mobile.mywebsite.com/static/404.shtml

Then it gets overwritten with the same text, so http://mobile.mywebsite.com/static/404.shtml appears, apparently unchanged.

Any ideas?

  • 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-02T18:14:22+00:00Added an answer on June 2, 2026 at 6:14 pm

    It sounds like you have custom http document defined in your apache configuration, i.e. something like:

    ErrorDocument 404 /un/404.shtml 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to set up my Django virtualenv production environment on a Linux
I just set up Django on a dreamhost server. Ran through everything, but can't
I just set up the Parallel Nsight debugging environment and started remote debugging my
I just set up fastcgi with lighty for django, but I'm getting the fcgi
Learning django & python. Just set up a new site after doing the tutorial.
I want to set up a Django server that allows certain users to access
I'm working on an online store in Django (just a basic shopping cart right
I've just set our development Django site to use redis for a cache backend
I am using django-registration, and just set it up. {{user.is_authenticated }} is true, even
I'm just learning Django, and I'm trying to set up the admin area for

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.