# This is an example nginx conf file that shows how to host the GUI locally using
# nginx. This conf file assumes the complied html/javascript is located in /www/current/

worker_processes  4;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    access_log  /www/logs/access.log;
    error_log  /www/logs/error.log;
    log_not_found off;

    sendfile        on;

    keepalive_timeout  165;

    gzip  on;
    gzip_disable "msie6";

    gzip_comp_level 6;
    gzip_min_length 1100;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types
        text/plain
        text/css
        text/js
        text/xml
        text/javascript
        application/javascript
        application/x-javascript
        application/json
        application/xml
        application/rss+xml
        image/svg+xml;

    server {
        listen       80;
        server_name  127.0.0.1;
        root /www/current/;

        ssl off;

        location ~ ^/(img|images|photo|photos|page|pages|uploads|countries|make|pic|foto|list|pictures|news|feed|rotated|carimg|category|reviews) {
            access_log off;
            return 404;
        }

        location ~ ^/[\w\d\.-]+\.(js|css|dat|png|json|ico)$ {
            access_log  /www/logs/root_access.log;
            error_log  /www/logs/root_error.log;
            try_files $uri 404;
        }

        location / {
            access_log  /www/logs/root1_access.log;
            error_log  /www/logs/root1_error.log;
            try_files $uri /index.html;
        }
    }
}
