apache cyrillic wildcards in virtualhost config

时光毁灭记忆、已成空白 提交于 2020-01-13 19:35:35

问题


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)

来源:https://stackoverflow.com/questions/43935286/apache-cyrillic-wildcards-in-virtualhost-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!