0

I have a django website running with mod_python and Apache. The current configuration directs all / traffic to the django site. Now, I need to enable userDir /~user on the machine as well. I have enabled the userDir module in Apache. Since, Apache is redirecting all the request to the django app, /~user is not working as the django just blurts out a 404. I understand that this is happening due to the following reason

<Location "/">
  SetHandler python-program
  PythonHandler django.core.handlers.modpython
  SetEnv DJANGO_SETTINGS_MODULE web.settings
  PythonOption django.root
  PythonDebug off
  PythonPath "['/path/to/the/django/source/'] + sys.path"
</Location>

What would I have to do to serve the webpage from / and also serve userDir from /~user ? (I think it has to do with regex and LocationMatch Apache directive. I am not good enough with regex to do what I want). Any help will be greatly appreciated.

Mir
  • 23
  • 4

1 Answers1

0
<LocationMatch "^/(?!~)">
  ....
</LocationMatch>
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • That's not quite working for me. What would work well with the configuration provided by Django? –  Dec 28 '11 at 12:37