No options-ssl-nginx.conf file


#1

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:www.odysseytours.nz

I ran this command:sudo certbot --nginx -d odysseytours.nz -d www.odysseytours.nz

It produced this output:Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] open() “/etc/letsencrypt/options-ssl-nginx.conf” failed (2: No such file or directory) in /etc/nginx/sites-enabled/odysseytours.nz.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(‘Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] open() “/etc/letsencrypt/options-ssl-nginx.conf” failed (2: No such file or directory) in /etc/nginx/sites-enabled/odysseytours.nz.conf:14\nnginx: configuration file /etc/nginx/nginx.conf test failed\n’,)

My web server is (include version):nginx version: nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version):Ubuntu server 18-04

My hosting provider, if applicable, is:N/A

I can login to a root shell on my machine (yes or no, or I don’t know):yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):Cinnamon desktop


#2

There is only /etc/letsencrypt/options-ssl-apache.conf

Will changing the name of this file to options-ssl-nginx.conf solve my problem or do I need to generate a new one somehow?

I was running my website on Apache, I had my website certified then I decided I wanted email. As iredmail 0.9.8 does not support Apache I uninstalled Apache and am trying to get things up and running on Nginx.


#3

That test needs to pass.

Please show:
/etc/nginx/sites-enabled/odysseytours.nz.conf
…there is something in line 14 that is causing a problem.


#4

I don’t know how this could have happened. It seems like a failed prior attempt to run Certbot, but I can’t think of any error that would leave your nginx configuration in this state.

You can find the needed file at

https://raw.githubusercontent.com/certbot/certbot/master/certbot-nginx/certbot_nginx/options-ssl-nginx.conf

The Apache one won’t work because it uses Apache configuration syntax instead of nginx configuration syntax.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.