Index: nginx.conf ================================================================== --- nginx.conf +++ nginx.conf @@ -1,6 +1,12 @@ # sample nginx config to serve the local site + +map $request_method:$is_args $hijack_root { + GET: /home/arcade/www; + + default /var/empty; +} server { listen *:80; listen [fec0::1]:80; server_name ^(?.+).hijack; @@ -11,13 +17,11 @@ error_page 404 = @break; log_not_found off; # autoindex on; location / { - if ($request_method != HEAD) { - root /path/to/www/$domain; - } + root $hijack_root/$domain; } location @break { # pointing out where our server listens proxy_pass http://localhost:8008;