nginx wildcard redirect suspicious symbols warnig

You won't match URIs in the server_name directive as it's ... for server names.

server {

    listen 80;
    server_name *.example.gr;

    location /en {
        return 301 http://www.example.gr/el/;
    }

}


server {

    listen 80;
    server_name www.example.gr;

    location /el {
        # Your stuff
    }

}

For the record, Nginx server name choosing order is :

  1. Exact name
  2. Longest name with a leading wildcard
  3. Longest name with a trailing wildcard
  4. First matching regular expression