I'm going into production mode for my django project, but running into a peculiar problem. I'm running my django through apahce+mod_wsgi and serving static files through nginx.
However my situation demands that I cannot serve "all" static files from nginx. There is a need to serve only "open-flash-chart.swf" from apache. The project uses openpyc and embeds open-flash-chart.swf which needs to run on same server as django, which in my case is Apache. How can I accomplish that? What changes to I need to make into Apache config files?
server {
listen 80 default;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
location / {
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location /media/ {
root /srv/www/enpass/;
expires max;
}
}