Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v0.66
@yuri-gushin
86 lines (67 sloc) 2.884 kB
user nobody nobody;
worker_processes 2;
worker_rlimit_nofile 8000;
events {
worker_connections 8192;
}
http {
perl_modules /opt/local/share/nginx;
perl_require Roboo.pm;
include /opt/local/etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
connection_pool_size 256;
client_header_buffer_size 1k;
client_body_buffer_size 16k;
large_client_header_buffers 4 16k;
request_pool_size 4k;
gzip off;
gzip_min_length 0;
gzip_buffers 4 8k;
gzip_types text/plain application/x-shockwave-flash text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_http_version 1.0;
output_buffers 1 32k;
postpone_output 1460;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 75 20;
ignore_invalid_headers on;
server_tokens off;
proxy_cache_path /opt/local/share/nginx/cache levels=1:2 keys_zone=cache:10m inactive=10m max_size=1000m;
server {
listen 80;
server_name _;
access_log /dev/null;
location / {
perl Roboo::handler;
set $Roboo_challenge_modes "SWF,gzip"; # SWF or JS, optionally gzip for encoding ("JS,gzip" or "SWF,gzip")
# Defaults
#set $Roboo_cookie_name "Anti-Robot"; # Cookie name used for challenge/response
#set $Roboo_validity_window 600; # Authentication validity time window
#set $Roboo_whitelist "IP(),UA(''),URI('')"; # Whitelist - IP addresses (CIDR), user-agents or URIs (PCRE)
#set $Roboo_charset "UTF-8"; # Charset used during challenge (for proper POST resubmissions)
#set $Roboo_challenge_hash_input $remote_addr; # Advanced - challenge hash basis, can add $server_name$server_port$http_host$http_user_agent
error_page 555 = @proxy;
expires epoch;
add_header Last-Modified "";
if ($Roboo_challenge_modes ~ gzip) {
gzip on;
}
access_log /var/log/nginx/challenged.log;
}
location @proxy {
proxy_pass http://example.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_cache cache;
proxy_cache_valid 5m;
gzip on;
access_log /var/log/nginx/verified.log;
}
}
}
Jump to Line
Something went wrong with that request. Please try again.