Forum Discussion
How to store a certificate in the configuration file?
Documentation for ngx_http_ssl_module says that it's possible to store the certificate (and the key) in variables.
The value data:$variable can be specified instead of the file (1.15.10), which loads a certificate from a variable without using intermediate files. Note that inappropriate use of this syntax may have its security implications, such as writing secret key data to error log.
Which is implying it's possible to store the certificate value in the variable. I'm trying to guess how to do it and can't find the proper way.
I've tried:
set $ssl_cert "-----BEGIN CERTIFICATE-----
MIIDHDCCAgQC
...
-----END CERTIFICATE-----
";
and
set $ssl_cert "application/x-pem-file;-----BEGIN CERTIFICATE-----
MIIDHDCCAgQC
...
-----END CERTIFICATE-----
";
Both didn't worked. What is the syntax for storing PEM file in the variable?
- JmtaylorModerator
GeorgeShuklin Hello, here are a couple articles that may help you with your questions
Loading configuration from SCF file fails with files missing error (f5.com)Overview of single configuration files (11.x - 17.x) (f5.com)
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com