Catchall domain with 0.6.30

Hey guys,

I’m trying to convert some virtual hosts to nginx currently and got it
running side-by-side with the current webserver on another ip.
Now I’m trying to set up the catchall host as taken from the docs but
I’m getting just an error message.
I must be doing something completely wrong, maybe you can point me at
it.

My conf for that part is as follows:
server {
listen 80.xxx.xxx.xxx:80;
server_name _ *;
access_log /var/log/nginx/catchall-access.log main;
include /etc/nginx/phplocation.conf;

    location / {
        index index.html;
        root  /home/path/image-server;
    }
}

And the error is the usual
server name “*” is invalid in /etc/nginx/nginx.conf:64

Any ideas?

Regards,

thomas

On Thu, May 8, 2008 at 12:31 PM, Thomas S. [email protected]
wrote:

   listen          80.xxx.xxx.xxx:80;

listen 80.xxx.xxx.xxx:80 default;

On Thu, May 08, 2008 at 12:31:30PM +0200, Thomas S. wrote:

   listen          80.xxx.xxx.xxx:80;

And the error is the usual
server name “*” is invalid in /etc/nginx/nginx.conf:64

The “*” was ugly hack that now is replaced with

server_name_in_redirect off;

The “*” has almost the same functionality, but not catchall function.

Now you may set

server {
server_name _;
# or server_name some.name;

    server_name_in_redirect  off;

On Thu, May 08, 2008 at 03:06:47PM +0400, Igor S. wrote:

My conf for that part is as follows:
}

And the error is the usual
server name “*” is invalid in /etc/nginx/nginx.conf:64

The “*” was ugly hack that now is replaced with

server_name_in_redirect off;

The “*” has almost the same functionality, but not catchall function.

The catchall server for given ip:port is the first server or defined
excplicity with “default” keyword:

    listen          80.xxx.xxx.xxx:80 default;

Almir K. schrieb:

On Thu, May 8, 2008 at 12:31 PM, Thomas S. [email protected] wrote:

   listen          80.xxx.xxx.xxx:80;

listen 80.xxx.xxx.xxx:80 default;

Thanks, thats something I missed.
But I added it and still the same error message.

Any further ideas?

Thanks,

thomas

On Thu, May 8, 2008 at 1:15 PM, Thomas S. [email protected]
wrote:

Thanks, thats something I missed.
But I added it and still the same error message.

Any further ideas?

if you add the default to listen directive you can take out the
server_name.

Igor S. schrieb:

    # or server_name  some.name;

    server_name_in_redirect  off;

Hi Igor,

thanks a lot. That helped.
I updated the english wiki too as that was my reference :slight_smile:

Regards,

thomas