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;
996aa0149d 2013-03-13 arcade@b1t.na: server_name ^(?<domain>.+).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;
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) {
996aa0149d 2013-03-13 arcade@b1t.na: root /path/to/www/$domain;
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 {
2af344df7b 2012-01-20 c.kworr@b84a3: # pointing out where our server listens
95fc83d16a 2012-01-20 c.kworr@b84a3: proxy_pass http://localhost:8008;
2af344df7b 2012-01-20 c.kworr@b84a3: # saying that we downloading from real site
996aa0149d 2013-03-13 arcade@b1t.na: proxy_set_header Host $domain;
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: }