2

In my configuration I have placed the ssl_* directives inside the http block and have been using a wildcard certificate certified by a custom CA without any problems. However, I now want to use a new certificate for a new subdomain (a server), that has been certified by a recognized CA.

Let's say the TLD is blah.org. I want my custom certificate with CN *.blah.org to be used on all domains except for new.blah.org that will use its own certificate/key pair of files with CN new.blah.org.

How would one do that? Adding new ssl_* directives inside the server block doesn't seem to override the global settings.

1 Answer 1

2

In my experience, settings in server stanzas do override those set in the surrounding http stanza, although I must admit I've never tried to set SSL parameters (given that you usually only have SSL config in your SSL vhosts).

You might want to describe exactly why you think it isn't working, and provide debug logs and your config files so the cause of your dilemma can be identified.

3
  • 1
    It might have to do with the fact that the default ssl certificate in the http block is a wildcard one. Unfortunately, I've been googling with no results and there's no errors in the logs.
    – alkar
    Apr 1, 2012 at 9:12
  • No, nginx doesn't care what's in your certificates. I'm not asking for logs to look for errors, I'm interested in the debug information.
    – womble
    Apr 1, 2012 at 9:14
  • For some strange reason nginx restart script failed to restart the process yet it did report as though nginx was successfully restarted. After a bit of looking through logs, I realized that and manually did a restart and it worked sucessfully. So nginx ssl_* directives are overriding as expected.
    – alkar
    Apr 1, 2012 at 10:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .