sign * in server_name
Igor Sysoev
is at rambler-co.ru
Wed Jun 13 14:38:44 MSD 2007
On Fri, Jun 08, 2007 at 08:57:34PM +0200, Martin Minka wrote:
> I tested the server_name directive and it works.
> The usage of _ is a little bit annoying, could it be fixed in future ?
>
> Tested example in file nginx.conf.default :
>
> server {
> listen 80;
> # server_name test.*; # does not work !
> server_name _ test.*; # works fine
> location / {
> root html;
> index test.html;
> }
> }
The first server name should not be wildcard, because HTTP/1.0 request
may be done without "host" header and when nginx will return redirect
/dir -> /dir/ it using first server_name.
I can allow
server_name *.example.com;
but nginx should warn about it.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list