Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.5k views
by
edited
nginx just quit on me , so I ran some test.

--------------------------

nginx -t

nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

2018/09/05 20:08:10 [warn] 1750#1750: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1

2018/09/05 20:08:10 [emerg] 1750#1750: BIO_new_file("/etc/letsencrypt/live/mydomain/fullchain.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/letsencrypt/live/mydomain/fullchain.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)

nginx: configuration file /etc/nginx/nginx.conf test failed

----------------------------------------

Then

-------------------------------------

certbot --nginx

The following error was encountered:

[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'

Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.

-----------------------

sudo certbot --nginx

Saving debug log to /var/log/letsencrypt/letsencrypt.log

The requested nginx plugin does not appear to be installed

---------------------------------------------------

Its something to do with cert permissions.  I saw the Nginx plugin disabled at one point. I thought I enabled it. Maybe it got disabled again. I am not sure what to do after this.

1 Answer

0 votes
by Expert
I don't really understand what's the issue. That's a totally normal behavior!

Read more about "users" and "sudo".

Also, why are you trying to run certbot manually?

Please, read the Webinoly "site command" documentation to know how to handle SSL certs automatically with Webinoly.
by

Well my site is offline and so I checked the server. I realized that Nginx is not running. I tried to restart Nginx and no luck. 

Then I tried nginx -t and got the following.

nginx -t

nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

2018/09/05 20:08:10 [warn] 1750#1750: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1

2018/09/05 20:08:10 [emerg] 1750#1750: BIO_new_file("/etc/letsencrypt/live/mydomain/fullchain.pem") failed (SSL: error:0200100D:system library:fopen:Permission denied:fopen('/etc/letsencrypt/live/mydomain/fullchain.pem','r') error:2006D002:BIO routines:BIO_new_file:system lib)

nginx: configuration file /etc/nginx/nginx.conf test failed

by Expert

Try: sudo nginx -t

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...