user nginx nginx; worker_processes 8; events { worker_connections 2000; } http { include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; keepalive_requests 100; keepalive_timeout 15; tcp_nodelay on; gzip on; gzip_min_length 1000; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain application/xml; gzip_disable "MSIE [1-6]\."; server { listen 80.94.68.70:80; listen [2a02:d28:101:1132:2::b2]:80; server_name www.nibbits.com wc3.nibbits.com sc.nibbits.com sc2.nibbits.com nibbits.com d3.nibbits.com www-dev.nibbits.com sc.www-dev.nibbits.com sc2.www-dev.nibbits.com wc3.www-dev.nibbits.com d3.www-dev.nibbits.com; client_max_body_size 20M; gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; 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 /var/log/httpd/nginx-domains/nibbits.com.log; # IP forwarding for stats to apache, is being caught by mod_rpaf proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # This block will catch static file requests, such as images, css, js # The ?: prefix is a 'non-capturing' mark, meaning we do not require # the pattern to be captured into $1 which should help improve performance location /static { expires 168h; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; alias /home/nibbits/domains/nibbits.com/public_html/project/nibbits/static; rewrite ^/static/\d+/(.*)$ /static/$1 last; } location /media/ { expires 168h; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; root /home/nibbits/domains/nibbits.com/public_html/; rewrite ^/media/images/(.*)$ /static/images/$1 permanent; valid_referers server_names blocked none www.freestarcraftmaps.com freestarcraftmaps.com freestarcraft2maps.com www.freestarcraft2maps.com freewarcraft3maps.com www.freewarcraft3maps.com www.gamerconfigs.com gamerconfigs.com; if ($invalid_referer) { rewrite ^ / redirect; #return 403; } } location / { proxy_pass http://80.94.68.72:80; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $Host; #proxy_cache nibbits-cache; #proxy_cache_valid 200 302 5m; #proxy_cache_valid 404 1m; #proxy_cache_key "$host$request_uri$cookie_nbsession"; } location /chat/ { root /home/nibbits/domains/nibbits.com/public_html/; proxy_pass http://80.94.68.72:80; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $Host; client_max_body_size 10m; client_body_buffer_size 128k; } location /sitemapimg/ { root /home/nibbits/domains/nibbits.com/public_html/; proxy_pass http://80.94.68.72:80; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $Host; client_max_body_size 10m; client_body_buffer_size 128k; } 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 /var/www/nginx-default; } location /nginx_status { stub_status on; access_log off; } } server { #listen 81.26.219.78:80; listen 80.94.68.73:80; server_name gamerconfigs.com www.gamerconfigs.com; client_max_body_size 20M; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; log_format gamerconf ‘$remote_addr – $remote_user [$time_local] “$request” ‘ ‘$status $body_bytes_sent “$http_referer” ‘ ‘”$http_user_agent” “$http_x_forwarded_for”‘; access_log /var/log/httpd/nginx-domains/gamerconfigs.com.log; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location /images { expires 168h; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; alias /home/gamerconf/domains/gamerconfigs.com/public_html/images/; } location / { proxy_pass http://80.94.68.66:80; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $Host; } location /nginx_status { stub_status on; access_log off; } } }