Modified nginx.conf and it works fine.
#user nobody;
worker_processes 5; ## Default: 1
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 1024;
}
http {
include mime.types;
include fastcgi.conf;
#include koi-utf;
#include koi-win;
index cache.html cache.htm cache.php;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128;
#keepalive_timeout 0;
#keepalive_timeout 65;
gzip on;
######## additional Gun-zip configurations start #########
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
#gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
# make sure gzip does not lose large gzipped js or css files
# see http://blog.leetsoft.com/2007/07/25/nginx-gzip-ssl.html
gzip_buffers 16 8k;
# Disable gzip for certain browsers.
gzip_disable “MSIE [1-6].(?!.*SV1)”;
######## additional Gun-zip configurations end #########
server {
listen 88;
server_name localhost;
access_log logs/host.access.log main;
access_log logs/host.access.log main;
# proxy module defaults
proxy_store_access user:rw group:rw all:r;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
#charset utf-8;
#charset windows-1251;
#source_charset koi8-r;
# serve static files
#location ~ ^/(images|javascript|js|css|flash|media|static)/ {
# root D:/docroot/nginx/static/;
# expires 30d;
#}
# Main location
location / {
include proxy.conf;
root D:/docroot/ngnix/;
index index.html index.htm;
set $prefix prefix_;
# Use this if you don't cache a context (dont_cache_path) , send all requests through the proxy
#location ~ ^/dont_cache_path {
# proxy_pass http://localhost:8080;
#}
# if the request uri was a directory, store the index page name
if ($request_uri ~ /$) {
set $store_extra index;
}
# set the location the proxy will store the data to. Add the index page
# name if the uri was a directory (nginx can't normally store these)
proxy_store D:/docroot/ngnix/${request_uri}${store_extra}.html;
# go through the proxy if there is no cache
if (!-f D:/docroot/ngnix/${request_uri}${store_extra}.html) {
proxy_pass http://192.168.2.201:80;
}
# workaround. headers module doesn't take into account proxy response
# headers. It overwrites the proxy Cache-Control header, causing
# private/no-cache/no-store to be wiped, so only set if not using proxy
#if (-f D:/docroot/ngnix/${request_uri}${store_extra}.html) {
# expires 0;
#}
# handle static files directly. Set their expiry time to max, so they'll
# always use the browser cache after first request
location ~* (css|js|png|jpe?g|gif|ico|swf)$ {
root D:/docroot/;
expires max;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}