I need to support few server names like:
ab1
ab2
ab3
abc
so the last letter can change I thought of having
server {
listen 80;
server_name ab?;
return 200 "i'm the server";
}
is this correct? how can I test it?
thanks
Yes, it should work, since nginx supports regex in server_name directive You can even capture the letter like this: