server {
    listen 80;
    server_name demo.oscarcommerce.com demo.oscar.tangentlabs.co.uk;

    access_log /var/log/nginx/access.demo.oscar.log;
    error_log /var/log/nginx/error.demo.oscar.log;

    gzip on;
    gzip_proxied any;
    gzip_types text/plain application/json;

	client_max_body_size 3M;

	location /media/ {
		root /var/www/oscar/builds/demo/sites/demo/assets;
	}
	location /static/ {
		root /var/www/oscar/builds/demo/sites/demo/public;
	}

    proxy_pass_request_headers on;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_read_timeout 120;

    location / {
        proxy_pass http://localhost:81;
    }
}