views:

22

answers:

1

I've a django server that server multiple sites, each site being a separate django project.

The layout is roughly :

Django/
   project1/
       app1
       app2
       .
       settings.py
       urls.py
       templates
  project2/
       app1
       etc.
static/
  project1/
       media/
           css/
           etc.
  project2
       media/
           etc.

The static files are hosted with apache. The django files are hosted through mod_wsgi.

I would like to move the static files inside the corresponding django project folder so moving around projects would be easier, for deployment on production servers etc.

Would this pose any (security related) issues with wsgi or apache in such a layout? Would you instead recommend another deployment option (like fabric)?

+1  A: 

As long as your directory options for the static files are limited to the static directory, you should be fine. Some web hosts have setups that prevent this kind of thing though, i.e. there's a separate apache instance that points to a folder outside your source. So you should check that this won't be a problem on that end. In general, I prefer to keep the folders separate to maintain a separation between HTML/media and source code, which makes it a little easier when you're working with a team and trying to isolate files between developers and designers.

ars
Yep, there shouldn't be any problem, provided you (or your host) gets your apache config correct.
Paul McMillan