> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ドメインとSSL証明書

## ドメイン設定

Difyエンタープライズ版には5つのドメインを設定する必要があります。ドメインは以下の通りです:

* コンソール: console.dify.local
* サービスAPI: api.dify.local
* アプリ: app.dify.local
* ファイル: upload.dify.local
* エンタープライズ: enterprise.dify.local

## Helmチャートの値からドメインの設定を確認する

### Helmチャートの値を表示する

```bash theme={null}
helm show values dify/dify
```

以下は、Helmチャートの値におけるドメインの設定の一例です。

```yaml theme={null}
global:
  consoleApiDomain: "console.dify.local"
  consoleWebDomain: "console.dify.local"
  serviceApiDomain: "api.dify.local"
  appApiDomain: "app.dify.local"
  appWebDomain: "app.dify.local"
  filesDomain: "upload.dify.local"
  enterpriseDomain: "enterprise.dify.local"
  ... ...
```

## SSL証明書の設定方法

### SSL証明書の生成

```bash theme={null}
kubectl create secret tls example-tls --key example.key --cert example.crt
```

### Helm値の更新

#### `useTLS` を `true` に設定

```yaml theme={null}
global:
  useTLS: true
```

#### Ingress値の更新

* 証明書が1つの場合は、次のように設定できます

```yaml theme={null}
ingress:
  tls: 
  - hosts:
    - console.dify.local
    - app.dify.local
    - api.dify.local
    - upload.dify.local
    - enterprise.dify.local
    secretName: example-tls
```

* 証明書が複数ある場合は、次のように設定できます

```yaml theme={null}
ingress:
  tls: 
  - hosts:
    - console.dify.local
    secretName: example-tls
  - hosts:
    - app.dify.local
    secretName: example-tls-2
  - hosts:
    - api.dify.local
    secretName: example-tls-3
  - hosts:
    - upload.dify.local
    secretName: example-tls-4
  - hosts:
    - enterprise.dify.local
    secretName: example-tls-5
```

## Http/Https キャッシュエラーについて

SSL証明書を設定した後、ブラウザで http/https のキャッシュエラーが発生する場合は、Dify サービスを再起動してキャッシュをクリアしてください。

```bash theme={null}
kubectl rollout restart deployment dify-api
kubectl rollout restart deployment dify-web
kubectl rollout restart deployment dify-enterprise-frontend
```
