Login to your Ubuntu, and run the following command:
openssl req -nodes -newkey rsa:2048 -sha256 -keyout myserver.key -out server.csr
It then will ask you some information for the certificate, fill them in and complete the process.
Country Name (2 letter code) []: (FR in France for example) State or Province Name (full name) [Some-State]: (your state or province name, name of your département in France) Locality Name (eg, city) []: (the name of your city) Organization Name (eg, company) []: (your organization name) Organizational Unit Name (eg, section) []: (do not fill - advised - or enter a generic term such as "IT Department".) Common Name (eg, YOUR name) []: (the name of the website to be secured) Email Address []: (let blank)
Do not fill in fields such as: “A challenge password” or “An optional company name”