Let’s extract CRT file using OpenSSL command as follows:
openssl pkcs12 -in ./name-of-pfx-file.pfx -clcerts -nokeys -out any-domain.crt
Followed by extracting private key file using another OpenSSL command as follows:
openssl pkcs12 -in ./name-of-pfx-file.pfx -nocerts -nodes -out any-domain.rsa
Sample Server block to map generate CRT and private key files:
server {
listen 443 ssl;
server_name any-domain.com any-domain.com;
ssl_certificate /path/to/your/CRT_file/domain.crt;
ssl_certificate_key /path/to/your/RSA_file/domain.rsa;
root /any-root;
index index.html;
include /etc/nginx/mime.types;
}
A freelance web developer with a decade of experience in creating high-quality, scalable web solutions. His expertise spans PHP, WordPress, Node.js, MySQL, MongoDB, and e-commerce development, ensuring a versatile approach to each project. Aadi’s commitment to client satisfaction is evident in his track record of over 200 successful projects, marked by innovation, efficiency, and a customer-centric philosophy.
As a professional who values collaboration and open communication, Aadi has built a reputation for delivering projects that exceed expectations while adhering to time and budget constraints. His proactive and problem-solving mindset makes him an ideal partner for anyone looking to navigate the digital landscape with a reliable and skilled developer.