Jika Anda ingin menggunakan nginx.conf kustom di Google Kubernetes Engine, siapkan nginx.conf tersebut dengan
memperluas
sample nginx.conf ini.
Berikut adalah cuplikan konfigurasi yang diperlukan oleh Cloud Endpoints:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eUsing the \u003ccode\u003e-n\u003c/code\u003e flag to provide a custom nginx configuration is generally not recommended, as it can lead to feature breakage; instead, the preferred method is to modify a copy of the automatically generated configuration.\u003c/p\u003e\n"],["\u003cp\u003eTo customize the nginx configuration, deploy an ESP container, copy the generated \u003ccode\u003enginx.conf\u003c/code\u003e from \u003ccode\u003e/etc/nginx/endpoints/\u003c/code\u003e, and make your changes to the copied file.\u003c/p\u003e\n"],["\u003cp\u003eWhen using a custom \u003ccode\u003enginx.conf\u003c/code\u003e on Google Kubernetes Engine, you should use the provided sample configuration as a base and ensure that it contains the required settings for Cloud Endpoints.\u003c/p\u003e\n"],["\u003cp\u003eThe nginx configuration must include specific directives like \u003ccode\u003eendpoints { on; }\u003c/code\u003e and after ESP version 1.7.0, the \u003ccode\u003eserver_config\u003c/code\u003e field should be set to \u003ccode\u003e/etc/nginx/server_config.pb.txt\u003c/code\u003e for proper functionality.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating a custom \u003ccode\u003enginx.conf\u003c/code\u003e, it needs to be deployed into Kubernetes via a ConfigMap and referenced within the Kubernetes configuration file, ensuring that the ESP container's arguments point to the custom configuration location.\u003c/p\u003e\n"]]],[],null,[]]