I tried to not fail the nginx server if ssl cert is not available. However the directive is not even allowed inside a statement. if (-f /var/www/x/etc/ssl.crt) { ssl_certificate /var/www/x/etc/ssl.crt; ssl_certificate_key /var/www/x/etc/ssl.key; } Also i do not believe its proper to fail the entire server if one server block fails.