On Sun, Jul 7, 2013 at 6:30 PM, lennart <[email protected]> wrote:
>
> Is there a way to do this with regex or variables? I've ~15 domains and it
> would be more convenient to have only one entry "to rule them all" ;-)
>

the regex way, which is supposedly slower:

server {
  server_name ~^www\.(?<domain>.+)$;
  listen 80; listen [::]:80;
  return 301 $scheme://$domain$request_uri;
}

--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to