Set up certbot with nginx built with ngx_pagespeed

Hello, I’m getting frustrated over this so I came here to ask,

I installed nginx on my 16.04 Ubuntu server following the instruction from : to have it with the ngnx_pagespeed plugin built in. As i add certbot to my server and try and obtain certificates it changes something in the conf file of nginx and i dont get the same of before.

The automatic installation from pagespeed install nginx in /usr/local/nginx/sbin/nginx and the conf file is located in /usr/local/nginx/conf/nginx.conf but when i download certbot and run

sudo certbot certonly --standalone -d

It creates other .conf files (maybe other nginx also)

My question is, is it possible to have certbot support with my configuration?

My domain is:

My web server is (include version): nginx 1.13.10

The operating system my web server runs on is (include version): Ubuntu 16.04

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

If you use standalone, it will not touch your nginx configuration at all, instead it will launch an internal webserver to authorize for your domain.

I installed with
sudo apt-get install python-certbot-nginx
could that have been the error?

Also if i try doing
nginx -v
it says nginx/1.10.3 (Ubuntu)
but if i do
/usr/local/nginx/sbin/nginx -v
which is my nginx it says
So i think i have two nginx now


What I did when I build my pagespeed Nginx from core is that I use all arguments from original Nginx and just replaced that Nginx. (What you are using is creating two Nginx instances)

And how would i do that? Install nginx first and the add the ngx_pagespeed module? Or install nginx the automated way and then add certbot only?

Now you can try using yum to remove the nginx (installed via yum) and proceed with certbot.

Also, you might need to change the nginx (startup file) from systemctl or whatever you use (to your new install)

Thank you

So I will try to remove the yum intalled nginx and change the /lib/systemd/system/nginx.service, and then try to do again the certbot ?

You might also need to specify Nginx path (not necessarily if certbot found the path)

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