Certbot: Renewal error: certbot.errors.MisconfigurationError: nginx restart failed: b'' b'' - smangukiya/odoo-tutorial-1 GitHub Wiki
I solved it, I needed to add the nginx pid number:
ps -ef | grep nginx and then write the pid to the file located in /run/nginx.pid
Then I run the command again and it worked
root@ymc:/etc/nginx/sites-enabled# ps -ef | grep nginx root 7466 1 0 Mar19 ? 00:00:00 nginx: master process nginx -c /etc/nginx/nginx.conf www-data 7476 7466 0 Mar19 ? 00:00:30 nginx: worker process root 32666 32113 0 02:11 pts/0 00:00:00 grep --color=auto nginx root@ymc:/etc/nginx/sites-enabled# vim /run/nginx.pid
root@ymc:/etc/nginx/sites-enabled# sudo certbot renew --cert-name Arizona.DNS.com --dry-run