server {
        listen          *:80 default_server;
        listen          [::]:80 default_server;
        server_name     _;
        access_log      /var/log/nginx/sandbox_access.log stat;
        error_log       /var/log/nginx/sandbox_error.log error;

        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Scheme $scheme;

        gzip on;
        gzip_min_length 10240;

        error_page 405 = @405;
        location @405 {
                proxy_pass      http://127.0.0.1:9998;
        }


        location = /nginx_status {
                stub_status     on;
                access_log      off;
                allow           127.0.0.1;
                allow 5.45.248.208/28; #cmsearchnets
                allow 5.255.206.0/25; #cmsearchnets
                allow 5.255.218.192/26; #cmsearchnets
                allow 87.250.237.0/26; #cmsearchnets
                allow 100.43.86.192/27; #cmsearchnets
                allow 141.8.189.128/27; #cmsearchnets
                allow 178.154.188.64/26; #cmsearchnets
                allow 178.154.239.192/26; #cmsearchnets
                allow 2a02:6b8:0:20a::/64; #cmsearchnets
                allow 2a02:6b8:0:c18::/64; #cmsearchnets
                allow 2a02:6b8:0:140f::/64; #cmsearchnets
                allow 2a02:6b8:0:14a0::/64; #cmsearchnets
                allow 2a02:6b8:0:161b::/64; #cmsearchnets
                allow 2a02:6b8:0:1814::/64; #cmsearchnets
                allow 2a02:6b8:0:1a19::/64; #cmsearchnets
                allow 2a02:6b8:0:3012::/64; #cmsearchnets
                deny            all;
        }

        location ~ ^/media/ {
                access_log off;
                root /home/zomb-sandbox/server/sandbox/web/;
        }

        location ~ ^/docs/ {
                access_log off;
                root /home/zomb-sandbox/;
        }

        location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
                access_log off;
                root /home/zomb-sandbox/server/sandbox/web;
        }

        location /sandbox/http_check {
                proxy_pass      http://127.0.0.1:9998;
        }

        location  / {
                proxy_pass      http://127.0.0.1:9998;
        }

}
