やりたかったこと *.example.com へのリクエストは当該ドメインの3000ポートに流したい、ただし user01-test.example.com というような形式へのリクエストだけは3001ポートに流したい という要件があったのでNGINXのバーチャルサーバーを2つ用意し、server_nameにワイルドカードのものと正規表現のものをそれぞれ設定してみましたが、すべてのリクエストが3000ポートに流れてしまい、正規表現ルールが評価されませんでした。 server { listen 80; server_name ~^([a-zA-Z0-9]+)-test\.example\.com$; location / { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forw