404 error for some Urls after setting redirect in apache httpd configuration

54 views
Skip to first unread message

Cathy Dai

unread,
Nov 7, 2013, 4:10:42 AM11/7/13
to moz...@googlegroups.com
My environment is Moztrap + apache 2.4 + mod_wsgi 3.4 + python2.7

everything works fine without httpd redirect.

After setting httpd redirect, none of the pages under /manage can work except for users and environments.  They reort 404 not found error. 

Here's my httpd.conf setting
DocumentRoot "/var/www/moztrap"
<Directory "/var/www/moztrap">
 AllowOverride All
 Require all granted
</Directory>


RewriteEngine on
Redirect /users/login/ /moztrap/users/login/

WSGIPythonPath  /var/www/moztrap
<VirtualHost *:80>
    DocumentRoot /var/www/moztrap
    ServerName   xx.xx.xxx.xxx

    Alias /static/ /var/www/moztrap/collected-assets/

    <Directory /var/www/moztrap/collected-assets>
        Require all granted
    </Directory>

    <Directory /var/www/moztrap/moztrap/deploy>
        Require all granted
    </Directory>
    WSGIDaemonProcess moztrap user=daemon group=daemon threads=25
    WSGIScriptAlias /moztrap /var/www/moztrap/moztrap/deploy/wsgi.py process-group=moztrap application-group=%{GLOBAL}
</VirtualHost>

In local.py, SITE_URL is changed from http://xxx to http://xxx/moztrap

For example, if I click "tag" under "manage", then it gives

Page not found (404)

Request Method:GET
Request URL:http://xx.xx.xxx.xxx/moztrap/manage/tags/

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

  1. ^$ [name='home']
  2. ^runtests/
  3. ^users/
  4. ^manage/
  5. ^results/
  6. ^admin/
  7. ^browserid/
  8. ^api/
  9. ^owa/
  10. ^media\/(?P<path>.*)$

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

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.


Any idea of this? Especially some pages work while most others throw 404 error?

Reply all
Reply to author
Forward
0 new messages