2

there is a question. I have project with many subdomains and it is configured like this:

VirtualHost1: ServerAlias a*.example.com
VirtualHost2: ServerAlias b*.example.com
VirtualHost3: ServerAlias c*.example.com

It works very good. And now I need the same, but with non-latin domains (cyrillic), something like this:

VirtualHost1: ServerAlias a*.example.com
VirtualHost2: ServerAlias б*.example.com
VirtualHost3: ServerAlias в*.example.com

While trying punycode converter I saw something like this:

ббб -> xn--90aaa
баб -> xn--80abb
бав -> xn--80abe

So even for one letter there is a problem to make a wildcard. Is there a way to make one virtual host for a first letter of a subdomain (25-30 virtual hosts) instead of alternative to write one virtual host per subdomain (400-500 virtual hosts)?

Maybe nginx or others can do something like this?

UPD. Each subdomain has its own ssl certificate so they must be connected with each other (now it is in apache configuration for a-z domains and its works as a wildcard: a*.example.com certificate, w*.example.com certificate and so on. We need to do the same with cyrillic subdomains)

  • I cannot find anything like that in nginx or apache. Personally I'd approach this problem with a server written in Node.js. – polkovnikov.ph May 12 '17 at 10:44
  • Unfortunately, it is not new project, it is 5 big sites under one domain. It is not seems like fast solution (to move from apache to self-written node.js server). Our project mainly written in PHP and full rewriting is not a choice. But if you mean something about nodejs gate/input proxy/dispatcher - it may be interesting (but i dont know if it is possible - all of subdomains has its own https certificate so there will be a task to attach it to subdomain manually. I know how to do it in apache and in nginx and all). If both thing are possible - i would like to know details. – user2971484 May 12 '17 at 14:20
  • how you imagine a punycode decoding routine for every http request? – Deadooshka May 12 '17 at 15:30

0 Answers0