different ssl_cerficate/ssl_cerficate_key pair for different $host in same server directive

huiming 877509395 at qq.com
Wed Mar 9 08:18:37 UTC 2022


hi Hello,  


    Is below configuration valid? nginx report 
    "nginx: [emerg] "ssl_certificate" directive is not allowed here in /usr/local/nginx/clientcfg/www.waf.soptest.com.443.conf:16"


    I hope different ssl_cerficate/ssl_cerficate_key pair for different $host in same server , it is possible?


    server {
        sever www
        if ( $host = "www.baidu.com" )
        {
            ssl_certificate /usr/local/nginx/cert/sdp.sopteset.com.443/sdp.sopteset.com.pem;
            ssl_certificate_key /usr/local/nginx/cert/sdp.sopteset.com.443/sdp.sopteset.com.key;
         }

         .......


    }


thanks
huiming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220309/46dacc6e/attachment.htm>


More information about the nginx mailing list