matching on server_name was: (Issue with variables in access_log and error_log)

Dale Gallagher dale.gallagher at gmail.com
Thu Jul 30 20:10:30 MSD 2009


Thanks for the responses.
However, a new issue has surfaced, hence the subject change ...

2009/7/29 Igor Sysoev <is at rambler-co.ru>:
> Since 0.7.44 you may use
>
>      server_name  ~^(w{3}\.)?(.*)$;
>      set   $domain  $2;

Unfortunately, on start-up, nginx exits with the error:

  [emerg]: directive "server_name" is not terminated by ";"

Yes, I did double-check that the trailing ; existed.

So, I then tried:

  server_name ~ "^(w{3}\.)?(.*)$";

which didn't cause nginx to exit, but all requests result in:

  502 Bad Gateway

Any ideas as to what might be wrong with the suggested config?

Thanks.





More information about the nginx mailing list