Hello,

 As noted previously I'm serving two independent, low-traffic django
projects off a single virtual host in order to use SSL without a
single certificate. Since I want static files to be SSL'd as well,
these are served from the same virtual host. This seems to be working,
with one mysterious glitch.
 All the dynamic stuff works fine for both sites. The problem I'm
having is that static files from project1 work fine, while static
files from project2 return a 404. For example, browsing to
      https://projects.mycompany.com/project1/static/img/logo.jpg
   returns the logo, while browsing to
       https://projects.mycompany.com/project2/static/img/logo.jpg
   returns a 404. All static files are like this, e.g. the project1
css works but the project2 css has no effect (b/c it's not found).
I've checked for asymmetries in the settings, urls, and views between
the two projects; they are basically identical except for "project1"
vs "project2" in urls etc. I've spent a lot of time with Django and
modpython and apache docs and still don't really understand what's
going on.

directory structure:

/usr/local/projects/
   /project1
      settings.py
      urls.py
      views.py
      /static
         /css
         /img
   /project2
      settings.py
      urls.py
      views.py
      /static
         /css
         /img

httpd.conf:

<VirtualHost _default_:443>
  ServerName projects.mycompany.com
  SetHandler python-program
  PythonInterpPerDirective On

  # Turn Off for production, On for dev:
  PythonAutoReload On
  PythonDebug On

  <Location "/project2">
      PythonHandler django.core.handlers.modpython
      PythonPath "['/usr/local/projects', '/usr/local/projects/
project1']+sys.path"
      SetEnv DJANGO_SETTINGS_MODULE project1.settings_prod
  </Location>
  <Location "/project1">
      PythonHandler django.core.handlers.modpython
      PythonPath "['/usr/local/projects', '/usr/local/projects/
project2']+sys.path"
      SetEnv DJANGO_SETTINGS_MODULE project2.settings_prod
  </Location>
  <LocationMatch "\.(jpg|gif|png|css|js)$">
      SetHandler None
  </LocationMatch>

  [... SSL stuff ...]

</VirtualHost>

Any ideas or pointers to help?
Many Thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to