server { listen 192.168.1.2:80; set_real_ip_from 127.0.0.1; set_real_ip_from 192.168.1.2; set_real_ip_from 91.191.223.197/32; real_ip_header CF-Connecting-IP; #Logging access_log /var/log/nginx/ganool.ws.access.log; error_log /var/log/nginx/ganool.ws.error.log; server_name ganool.ws www.ganool.ws www1.ganool.ws www2.ganool.ws www3.ganool.ws www4.ganool.ws; location / { location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot)\$ { expires 7d;#Comment this out if you are using the apache backend cache-control/expires headers. try_files \$uri \@backend; } error_page 405 = \@backend; error_page 500 = \@custom; add_header X-Cache "HIT from Backend"; proxy_pass http://10.208.99.26:202; include proxy.inc; } location \@backend { internal; proxy_pass http://10.208.99.26:202; include proxy.inc; } location \@custom { internal; proxy_pass http://10.208.99.26:202; include proxy.inc; } location ~ .*\.(php|jsp|cgi|pl|py)?\$ { proxy_pass http://10.208.99.26:202; include proxy.inc; } location ~ /\.ht { deny all; } }