I’m having a bit of trouble with serving static items (eg, CSS, images, etc) with my Django/Passenger setup. If I understand it correctly, when you set up a domain with support for Passenger, the public directory (where you put pages that you DON’T want Django to serve) is mydomain.com/public.
If I put ‘picture.jpg’ in my /public directory in my site, and go to mydomain.com/picture.jpg, it works fine. However, I can’t have any subfolders in the /public, because that would mean accessing the content in those subfolders with mydomain.com/subfolder/picture.jpg. If I use that address, it will go to Django, which will try to route the URL according to urls.py.
What is the best way to have a static directory for media that Django doesn’t interfere with? I know that Django can serve static content with the django.views.static.serve function, but everywhere I’ve read says thats a bad way to go for production servers. What is the best way to set up on DH so that static content is served by Apache?