Invalid nginx.pid after moving to openresty from nginx

My domain is: cairopulse.com

I ran this command: sudo certbot renew --dry-run

It produced this output: nginx: [error] invalid PID number “” in “/run/nginx.pid”

My web server is (include version): Openresty

The operating system my web server runs on is (include version): ubuntu 18.04

My hosting provider, if applicable, is:

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): no

I generated a certificate and it was working fine on my domain with nginx. I then moved to openresty server (which includes nginx inside it). When I test certificate renewal it generates the mentioned error. /run/nginx.pid is empty. openresty.pid has a process number.
How can I tell certbot to look for nginx that is running inside openresty?

1 Like

Hi,

Unfortunately, you can't use certbot nginx plugin with OpenResty. The best way to proceed is to use webroot plugin instead of nginx.

You can try to follow the link and edit your renewal configuration for that site to convert it into webroot (instead of Nginx)

Thank you

2 Likes

Thanks. That’s good enough and it worked.
I am new to this ans was not aware of what the different plugins were.

2 Likes

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