solving certbot renew unknown directive passenger_root and nginx

January 05, 2023
While trying to renew the certbot certificates we had from let's encrypt, 
We were faced with a problem, where certbot was erroring out on us. Giving us unknown directive "passenger_root" on nginx.conf . 
It seems since, we had a custom location for nginx on /opt/nginx somehow certbot was not smart emough to understand this. 
Hence, 
$sudo certbot renew  --nginx-server-root /opt/nginx --nginx-ctl /opt/nginx/sbin/nginx

The above command where we gave two custom parameters of --nginx-server-root  and --nginx-ctl seemed to solve the problem.

Test for ruby syntax highlighting.