Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

421
Views
Nginx : Conditionally listen to SSL port if valid certificates are present in directory

I need to support both http and Https for my service which is using Nginx. Below code in nginx.conf file does this job:

server 
{
    listen 80 default_server;
    listen              443 ssl;
    keepalive_timeout   70;

    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
    ssl_certificate     /etc/nginx/environments/cer.pem;
    ssl_certificate_key /etc/nginx/environments/key.key;
    ....
    .... 
}

The problem comes in case certificates are not mounted in the folder. In that case Nginx server doesn't reload and doesn't even listens to http. Is there any approach in which the server continue to listen http if any ssl related issue is occurring? Any way in which we can conditionally listens to the port by checking if ssl_certificates are present in directory. Need Help

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!