upstream class_app_server {
        server 127.0.0.1:8001 fail_timeout=0;
}

server {
        listen 80;
        client_max_body_size 4G;
        server_name dummy-host.com 

        keepalive_timeout 5;

        access_log  /var/log/nginx/distributedjmeter.access.log;
	    error_log /var/log/nginx/distributedjmeter.error.log;

        root /var/www;

        location / {
		index index.html;
                gzip             on;
                gzip_min_length  1000;
                gzip_proxied     expired no-cache no-store private auth;
                gzip_types       text/plain text/xml text/css application/xhtml+xml application/xml application/rss+xml application/javascript application/x-javascript;
                gzip_disable     "MSIE [1-6]\.";
        }
	
	location /distributed-jmeter/static {
		 alias /home/<user>/webapp/releases/current/webapp/static;
	}

    location /distributed-jmeter {
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header Host $http_host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header REMOTE_HOST $remote_addr;
         proxy_set_header X-FORWARDED-PROTOCOL $scheme;
		 proxy_set_header SCRIPT_NAME /distributed-jmeter;
         proxy_redirect off;
         proxy_pass http://127.0.0.1:8001;
    }
}
