Nginx – Only enable SSL if SSL Certificates Exist

You can create an additional file ssl.conf and put here ssl configs:

ssl_certificate      /etc/nginx/certs/atvcap_cabundle.crt;
ssl_certificate_key  /etc/nginx/certs/atvcap.key;

Then include from the main config:

server_name          atvcap.server.com;

include /somepath/ssl.conf*;

Make sure to include * symbol – this will not break when the file does not exist at development mode.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)