1
たとえば、ドメインexample.comを持っていると、ユーザーがサインアップするときにWebアプリケーションによってサブドメインが作成されます。ワイルドカードドメイン(Nginx)から特定のサブドメインを除外する方法
- foo.example.com同じサイトを指します
- bar.example.com、は、同じサイトに
を指すようになります。しかし、私はテスト環境を作成したいです例えばdemo.example.comこれは別のプロジェクトを指します。ユーザーがサインアップするとき、それはあります
- foo.demo.example.com
- bar.demo.example.com
私が持っている現在、どのような
| Name | Type | Value |
|----------------|-------|-----------------|
| example.com. | A | 123.123.123.123 |
| *.example.com. | CNAME | example.com. |
と私のnginxの設定
server {
listen 80;
root /var/www/example.com/public;
index index.html index.htm index.php;
server_name example.com *.example.com;
location/{
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
テスト環境用に1を作成するにはどうすればよいですか?