If you run the grep -nRP '[\x80-\xFF]' /etc/nginx
command, it should find the exact location in your configuration where you have non-ASCII characters.
I will run this command now and then I will show the location to you. How can i edit it. Please help
me. Thanks.
You can edit this file with a text editor.
If you don’t know how to use any text editor, you could do
sed -i "s/uploads that are.*t images,/uploads that aren't images,/" /etc/nginx/sites-available/digitalocean
(note that this is a single command that belongs all on one line)
@schoen, when i run this command and how to edit this file in mac?
Thanks.
You could run it in the same terminal prompt where you ran that grep
command.
It edited the file, but didn’t output anything.
How to output this file? Please advice me. Many thanks for helping. I really need Very Urgent.Please
support this command.
Thanks.
You don’t need to.
I guess you could use “grep -nRP '[\x80-\xFF]' /etc/nginx
” and “grep 'uploads that' /etc/nginx/sites-available/digitalocean
” to double check that it worked.
You don’t need to. You can if you want to, to check your work.
Try running Certbot again.
@mnordhoff, when i run this command, I got this message
" sudo certbot certonly --nginx -d straatosphere.com -d www.straatosphere.com -d cdn.straatosphere.com -d cdn2.straatosphere.com -d cdn3.straatosphere.com -d cdn4.straatosphere.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for cdn2.straatosphere.com
http-01 challenge for cdn3.straatosphere.com
http-01 challenge for straatosphere.com
http-01 challenge for cdn.straatosphere.com
http-01 challenge for www.straatosphere.com
http-01 challenge for cdn4.straatosphere.com
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Cleaning up challenges
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Encountered exception during recovery:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 75, in handle_authorizations
resp = self._solve_challenges(aauthzrs)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 139, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1071, in perform
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 881, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1141, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/error_handler.py", line 108, in _call_registered
self.funcs-1
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 323, in _cleanup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1090, in cleanup
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 881, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1141, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
nginx restart failed:
b''
b''
"
Thanks.
Is Nginx currently running?
How was it started?
Do you know what happened to /run/nginx.pid
?
I don’t know yet because last time i used cpanel and upload website like that. Really sample. That is my fast time. I don’t also know who created this one?
Thanks.
How can i renew ssl next time? What will be happen? How can solved this problem.
Please help me to solve.
Thanks.
Maybe you could first try restarting nginx with
sudo service nginx restart
If that doesn’t produce any errors, you could retry your command
sudo certbot certonly --nginx -d straatosphere.com -d www.straatosphere.com -d cdn.straatosphere.com -d cdn2.straatosphere.com -d cdn3.straatosphere.com -d cdn4.straatosphere.com