Error on 'ascii' code on new server


#1

My domain is: I have multiple domains hosted on my server.

I ran this command: sudo certbot --nginx

It produced this output:
An unexpected error occurred:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 1039: ordinal not in range(128)

My web server is (include version): nginx/1.10.0

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

My hosting provider, if applicable, is: digital ocean

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 have three domains on a VPS digital ocean, manually setup with vhosts. I am pretty sure they don’t have any ascii error. I am wondering how can I automate the procedure for installing them? After the initial failure I tried this command on one domain (a basic wordpress site, the domain is aerialbodies.gr ) certbot certonly --webroot --webroot-path /my-app-path/aerialbodies/ and it downloaded the certificates. I also tried sudo certbot renew --dry-run and it seems it renews them.

I am wondering should I add them manually now to the vhosts or is there a procedure for being added automatically? Is there some documentation somewhere when you have multiple domains?


#2

I guess you’ve got a â in one of your hostnames somewhere, which isn’t allowed because it isn’t an ASCII character.


#3

Or maybe it’s this bug? in which case the character might be somewhere else in your nginx configuration.


#4

Any suggestions on which files should I look? I am not sure which files the scripts are looking and modifying.


#5

This might provide a clue:

grep -nRP '[\x80-\xFF]' /etc/nginx

Certbot gives UnicodeDecodeError
#6

Thank you, it worked! Everything worked like a charm. The problematic character was one (I copy/paste some config with comments from the internet and it has included this one as well).


#7

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