Can't get catch-all default domain to work

saffer 6 years ago 0

I'm trying to set up a catch-all domain on my server, so basically any requests that don't match any of my domains land on a default page. 

This is the nginx config for it:

server {
    listen *:80;
listen *:443 ssl;
    ssl_certificate /var/cert/default.crt;
    ssl_certificate_key /var/cert/default.key;
    server_name _;

    access_log /var/log/nginx/default.access.log;
    error_log /var/log/nginx/default.error.log;

    root /srv/default;
    index index.html index.htm index.php;

Anyone has any ideas why it doesn't work. If you need any more info I can get it.

Thanks in advance,