Par exemple, si vous modifiez virtualhosts et env, vous devez appliquer la modification sans utiliser ‑‑settings, comme suit, pour mettre à jour le cluster. Exemple :
Ou, pour mettre à jour le composant pour tous les environnements :
apigeectl apply -f overrides-file.yaml --all-envs
Clés et certificats TLS
La propriété virtualhost nécessite une clé et un certificat TLS.
La clé/le certificat permettent de communiquer de manière sécurisée avec la passerelle d'entrée et doivent être compatibles avec les alias d'hôtes utilisés dans le groupe d'environnements spécifié.
Il vous revient de générer les paires certificat/clé TLS appropriées pour votre configuration hybride. Les articles suivants ne sont fournis qu'à titre d'exemple. Ils sont destinés principalement à l'essai ou au test d'une nouvelle installation hybride s'il est impossible d'obtenir des identifiants TLS d'une autre manière :
Consultez la page Récupérer des identifiants TLS pour obtenir un exemple d'étapes permettant de créer une paire clé/certificat TLS autorisée.
Vous pouvez utiliser une ou plusieurs paires certificat/clé autosignées à des fins de test uniquement. Consultez la page Générer des identifiants TLS autosignés.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/03 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/03 (UTC)."],[[["\u003cp\u003eVirtual hosts enable Apigee hybrid to manage API requests directed to host aliases associated with an environment group.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evirtualhosts\u003c/code\u003e property is an array, allowing for the configuration of multiple virtual hosts, each typically having its own TLS certificate/key pair for enhanced security.\u003c/p\u003e\n"],["\u003cp\u003eChanges to the \u003ccode\u003evirtualhosts\u003c/code\u003e property alone can be applied using the \u003ccode\u003e‑‑settings virtualhosts\u003c/code\u003e flag with the \u003ccode\u003eapigeectl apply\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eIf \u003ccode\u003evirtualhosts\u003c/code\u003e changes are coupled with other modifications (e.g., \u003ccode\u003eenv\u003c/code\u003e), then \u003ccode\u003eapigeectl apply\u003c/code\u003e must be used without the \u003ccode\u003e‑‑settings\u003c/code\u003e flag, or with the \u003ccode\u003e--all-envs\u003c/code\u003e flag to update the cluster or component.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003evirtualhost\u003c/code\u003e requires a TLS key and certificate to secure communication with the ingress gateway, and these credentials must be compatible with the host aliases used in the designated environment group.\u003c/p\u003e\n"]]],[],null,["# Configure virtual hosts\n\n| You are currently viewing version 1.10 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nThis topic discusses the [virtualhosts](/apigee/docs/hybrid/v1.10/config-prop-ref#virtualhosts) configuration property.\nVirtual hosts allow Apigee hybrid to handle\nAPI requests to hostaliases associated with an environment group. For more information, see\n[Routing and base\npaths](/apigee/docs/api-platform/fundamentals/environments-overview#routing) in the [About\nenvironments and environment groups](/apigee/docs/api-platform/fundamentals/environments-overview) topic. \n\n```text\n...\nvirtualhosts:\n - name: my-env-group\n sslCertPath: ./certs/fullchain.pem\n sslKeyPath: ./certs/privkey.key\n...\n```\n\n\nWhen an API proxy call comes, it is routed to the host alias(es) of the environment group\nwhere the API proxy is deployed.\n\n\nFor instructions on how to apply `virtualhosts` to the cluster, see\n[Applying virtualhosts changes](#applying). For information about configuring\nTLS, see [Configuring TLS and mTLS on the Istio ingress](/apigee/docs/hybrid/v1.10/ingress-tls).\n\nAdding multiple virtual hosts\n-----------------------------\n\n\nThe `virtualhosts[]` property is an array, and therefore you can create more than\none. \n\n```text\n...\nvirtualhosts:\n - name: my-env-group-1\n sslCertPath: ./certs/fullchain1.pem\n sslKeyPath: ./certs/privkey1.key\n\n - name: my-env-group-2\n sslCertPath: ./certs/fullchain2.pem\n sslKeyPath: ./certs/privkey2.key\n...\n```\n| **Tip:** For security purposes, it is best practice to have a separate TLS cert/key pair for each virtual host. If you are using a Subject Alternative Name (SAN ) certificate, this TLS cert/key pair should be used on one virtual host that is shared across the domain.\n\n\nFor information about configuring\nTLS, see [Configuring TLS and mTLS on the Istio ingress](/apigee/docs/hybrid/v1.10/ingress-tls).\n\nApplying `virtualhosts` changes\n-------------------------------\n\n\nIf you only add or change the `virtualhosts`\nproperty, and nothing else, then you can apply those changes with the `‑‑settings` flag: \n\n```\napigeectl apply -f overrides-file.yaml ‑‑settings virtualhosts\n```\n\nIf, for example, you change `virtualhosts` and `env`, then you must\napply the change without using `‑‑settings`, like this, to update the cluster. For\nexample: \n\n```\napigeectl apply -f overrides-file.yaml --env my-environment\n```\n\n\nor, to update the component for all environments: \n\n```\napigeectl apply -f overrides-file.yaml --all-envs\n```\n\nTLS keys and certificates\n-------------------------\n\nThe `virtualhost` property requires a TLS key and certificate.\nThe key/cert are used to provide secure communication with the ingress gateway and\nmust be compatible with the host aliases used in the specified environment group.\n\n\nIt is up to you how you generate proper TLS certificate/key pairs for your hybrid\nconfiguration. The following topics are provided as samples only, intended primarily\nfor trying out or testing a new hybrid installation if it isn't feasible to obtain\nTLS credentials in another way:\n\n- See [Obtain TLS credentials](/apigee/docs/hybrid/v1.10/lets-encrypt) for a set of sample steps for creating an authorized TLS certificate/key pair.\n- You can use a self-signed certificate/key pair(s) for testing purposes only. See [Generate self-signed TLS credentials](/apigee/docs/hybrid/v1.10/environment-self-signed-tls)."]]