some of my user cannot access my website

leontinus nginx-forum at nginx.us
Tue Apr 17 10:51:54 UTC 2012


by the way here i put my website proxy configuration


#-- notice info
error_log  /data/share/project/www-conf/logs/nginx.err.proxy.log;
pid	   /data/share/project/www-conf/logs/nginx.proxy.pid;

user ngproxy tokopedia;
worker_processes  4;


events {
	worker_connections  1024;
}




http {
	include /share/project/www-conf/nginx/tkpmodperl1/mime.types;
	include /share/project/www-conf/nginx/deny.conf;

	default_type  text/plain;
	sendfile	   on;
	keepalive_timeout  5;

        set_real_ip_from   192.168.1.0/24;
        real_ip_header     X-Forwarded-For;

	gzip  on;
	#gzip off;
	gzip_types text/plain text/css application/x-javascript;
	gzip_comp_level 9;
	gzip_proxied any;
	#gzip_vary off;	
	#charset  ISO-8859-1;
	
	charset UTF-8;
	source_charset UTF-8;

	#-------------------
	server {
		server_name  tokopedia;
		listen	   80;
		proxy_set_header X-Forwarded-Host $host:$server_port;
		proxy_set_header X-Forwarded-Server www.tokopedia.com;
		proxy_set_header X-Forwarded-For $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header Accept-Encoding "";
		proxy_buffering on;
		proxy_buffers 8 64k;

		if ($http_user_agent ~* big.brother|crawl ){return 403;}
		if ($http_user_agent = "" ){return 403;}

		location /___pstatus {
			stub_status on;
			access_log   off;
		}
		
		location /img/ {
			proxy_pass  http://xxx.xxx.xxx.xxx/img/;
		}
				
		location ~* ^/(.*)\.(js|css)$ {
			proxy_pass  http://xxx.xxx.xxx.xxx/$1.$2;
		}


		location / { proxy_pass http://xxx.xxx.xxx.xxx:888/;	}

	}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,225421,225422#msg-225422



More information about the nginx mailing list