Switching to letsencrypt causes duplicate ssl_certificate directive on nginx

was switching from an expired paid certificate to a letencrypt and it apparently added ssl_certificate twice, or just didn't replace the 1st.


Requesting a certificate for this domain from Let's Encrypt .. .. request was successful! Configuring webserver to use new certificate and key .. .. done Applying Nginx configuration .. .. configuration is invalid : nginx: [emerg] "ssl_certificate" directive is duplicate in /etc/nginx/nginx.conf:300 nginx: configuration file /etc/nginx/nginx.conf test failed
Status: 
Active

Comments

Can you post your whole Nginx config file, or at least the parts that contain the duplicate lines? I'd like to see what scopes they are in.

Didn't save it, had to get the server up. I believe they were in the same scope. Had some if's and rewrites but it wasn't inside them.