I have a number of PHP sites running on Apache, however I am about to launch my first Django site.
I have successfully got WSGI working on Apache to handle the Python scripts but I am a bit stuck with using Nginx to serve my media files.
I know I need to make Apache listen on a different port and get Nginx to listen on port 80, then forward any non-media requests to Apache on port 8080.
What I really want to know is, is there an easy way to configure it to work with all of my existing sites or do I need to set up a separate record for every one of my current sites just to forward the requests to port 8080?
Any advice appreciated.
Thanks
If you scroll down a bit in the Django documentation about serving static files, they give you the information on how to make Apache serve the files for you so that you don’t need nginx (assumes your media files are in
/usr/local/wsgi/static/media/):If, however, you are dead set on using nginx, you would add your static directives in your
server {}directive: