so I run sudo apt-get purge certbotapt
to uninstall certbot and letsencrypt?
It looks like sple.sh actually uses letsencrypt
on Ubuntu 16.04. . My bad.
So at this point your choices are probably are:
- Stick to your current up-to-date Certbot, and use it in
--webroot
mode. This means configuring your nginx virtual hosts on your own, or - You could try modiy the
sple.sh
script to use your up-to-date Certbot, but I canât recommend it if youâre uncomfortable with figuring that out on your own
I'd like to go with this option, but I am unsure how to configure my nginx virtual hosts because I do not know where I would do that or what information I would use.
Certbot currently works for me, so I don't know if that means my virtual hosts are already configured... How do I configure my virtual hosts? Do Ihave to do that everytime I renew my certificate?
@_az damn I just broke my website by running sple.sh. When I try to visit my URL now it says that the server refused to connect.
Shouldnât be too tough to repair, this should tell you whatâs wrong:
service nginx-sp configtest
@_az
nginx-sp: unrecognized service
this is weird output, I think you are right in calling it nginx-sp⌠wtf?
Maybe
sudo nginx-sp -t
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/vhosts.d/portfolio.ssl.conf:7
nginx: the configuration file /etc/nginx-sp/nginx.conf syntax is ok
nginx: [emerg] open() "/srv/users/root/log/portfolio/portfolio_nginx.access.log" failed (2: No such file or directory)
nginx: configuration file /etc/nginx-sp/nginx.conf test failed
Alright.
In /etc/nginx-sp/vhosts.d
you should find some files ending in .ssl.conf
.
In those files, you should find some lines starting with:
error_log /srv/...
access_log /srv/...
You should be able to temporarily comment them out (stick a #
at the front) and try restart nginx-sp again.
$ sudo service nginx-sp restart
Job for nginx-sp.service failed because the control process exited with error code. See "systemctl status nginx-sp.service" and "journalctl -xe" for details.
but I did comment out those lines
If you run into failures, try the sudo nginx-sp -t
to find what the next error is.
Did you already have SSL certificates configured before you endeavored to upgrade Certbot? Or are you adding them for the first time to this domain?
# sudo nginx-sp -t
nginx: [emerg] unknown directive "brothman@mail.com###############################################################################" in /etc/nginx-sp/vhosts.d/portfolio.conf:10
nginx: configuration file /etc/nginx-sp/nginx.conf test failed
yes I already had certificates working
Well, that error looks unrelated to anything that sple.sh did. You should be able to open up this file at line 10 to see what's going on in there:
oh I used stop instead of restart so now it is off but I cannot start it again, lol
@_az hmm I cannot go to my site anymore⌠that is bad. Do you know how to resolve that issue?
Youâll need to go investigate that error at line 10 in the file I mentioned in my last post.
Looks like a comment that went bad, or something like that.
Yeah I checked the file the first time and I don't see any problems unless it is that semicolon on a line by itself... If I move it up to the end of the line above it will that fix the server from refusing to connect?
brothman@mail.com###############################################################################
DO NOT EDIT THIS FILE.
Your changes to this file will be overwritten by ServerPilot.
For information on how to customize nginx settings, see
Customizing the Nginx Configuration - ServerPilot
###############################################################################
server {
listen 80;
listen [::]:80;
server_name
67.209.153.26
www.67.209.153.26
;root /srv/users/serverpilot/apps/portfolio/public; access_log /srv/users/serverpilot/log/portfolio/portfolio_nginx.access.log main; error_log /srv/users/serverpilot/log/portfolio/portfolio_nginx.error.log; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; include /etc/nginx-sp/vhosts.d/portfolio.d/*.nonssl_conf; include /etc/nginx-sp/vhosts.d/portfolio.d/*.conf;
}
Iâm not sure how your email address ended up there (looks like it was accidental), but you should remove it, run sudo nginx-sp -t
again, and if thatâs OK, restart nginx.
hmm that fixed it but something else failed.
$ nginx-sp -t
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/vhosts.d/portfolio.ssl.conf:7
nginx: the configuration file /etc/nginx-sp/nginx.conf syntax is ok
nginx: [emerg] open() "/srv/users/root/log/portfolio/portfolio_nginx.access.log" failed (2: No such file or directory)
nginx: configuration file /etc/nginx-sp/nginx.conf test failed
Probably the issue is the root
in that line, but you could try quickly work around it with:
sudo mkdir -p /srv/users/root/log/portfolio/
Could you also list what certificates you have present in Certbot? Iâm thinking about whatâs the quickest way to get your site up and working with SSL as well.
sudo certbot certificates