server { listen 80 ; gzip on; access_log /var/log/mediacms/nginx.access.log; error_log /var/log/mediacms/nginx.error.log warn; location /static { alias /var/www/static ; } location /custom/static { alias /var/www/custom ; } location /media/original { alias /var/www/media/original; } location /media { alias /var/www/media ; add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; } location / { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; include /etc/nginx/uwsgi_params; uwsgi_pass web:9000; } }