08ae38b6ce 2010-06-25 c.kworr@b84a3: # sample nginx config to serve the local site
08ae38b6ce 2010-06-25 c.kworr@b84a3:
08ae38b6ce 2010-06-25 c.kworr@b84a3: server {
08ae38b6ce 2010-06-25 c.kworr@b84a3: listen *:80;
08ae38b6ce 2010-06-25 c.kworr@b84a3: listen [fec0::1]:80;
08ae38b6ce 2010-06-25 c.kworr@b84a3: server_name site.to.hijack;
08ae38b6ce 2010-06-25 c.kworr@b84a3: access_log /var/log/nginx/site_name.access.log;
08ae38b6ce 2010-06-25 c.kworr@b84a3: error_log /var/log/nginx/site_name.error.log debug;
08ae38b6ce 2010-06-25 c.kworr@b84a3: # if no file found locally we are breaking connection
08ae38b6ce 2010-06-25 c.kworr@b84a3: # helps with clients that treat 404 as general error
95fc83d16a 2012-01-20 c.kworr@b84a3: expires -1;
95fc83d16a 2012-01-20 c.kworr@b84a3: try_files $uri @break;
08ae38b6ce 2010-06-25 c.kworr@b84a3: error_page 404 = @break;
95fc83d16a 2012-01-20 c.kworr@b84a3: log_not_found off;
95fc83d16a 2012-01-20 c.kworr@b84a3: # autoindex on;
08ae38b6ce 2010-06-25 c.kworr@b84a3:
08ae38b6ce 2010-06-25 c.kworr@b84a3: location / {
95fc83d16a 2012-01-20 c.kworr@b84a3: if ($request_method != HEAD) {
95fc83d16a 2012-01-20 c.kworr@b84a3: root /home/arcade/www/windowsupdate;
95fc83d16a 2012-01-20 c.kworr@b84a3: }
08ae38b6ce 2010-06-25 c.kworr@b84a3: }
08ae38b6ce 2010-06-25 c.kworr@b84a3:
08ae38b6ce 2010-06-25 c.kworr@b84a3: location @break {
95fc83d16a 2012-01-20 c.kworr@b84a3: proxy_pass http://localhost:8008;
95fc83d16a 2012-01-20 c.kworr@b84a3: proxy_set_header Host download.windowsupdate.com;
95fc83d16a 2012-01-20 c.kworr@b84a3: proxy_read_timeout 600;
08ae38b6ce 2010-06-25 c.kworr@b84a3: }
08ae38b6ce 2010-06-25 c.kworr@b84a3: }