サブドメインのルート URL とサブドメインのディレクトリをサーバー上の 2 つの異なるフォルダーに提供しようとしています。これが私が持っていて機能していない簡単なセットアップです...
server {
index index.html index.htm;
server_name test.example.com;
location / {
root /web/test.example.com/www;
}
location /static {
root /web/test.example.com/static;
}
}
この例でtest.example.com/
は、インデックス ファイルを取り込みます。/web/test.example.com/www
に行くとtest.example.com/static
、インデックスファイルが取り込まれます/web/test.example.com/static