Please help to fix SSL certificate error after I tried to add my second domain


I had a working blog on
I followed a standard installation process to install it on VPS and I was able to obtain my SSL certificate with that blog.

Then I bought a new domain and tried to add it to the same VPS.
I linked my VPS with DNS records of domain before I started to do the following.

I followed this guide starting from Step 8.

# Logout from your user account and use root
$ logout
# Create a new user and follow prompts
$ adduser <user2>
# Add user2 to superuser group to unlock admin privileges
$ usermod -aG sudo <user2>

# Then log in as the new user if your friend is not nearby
$ su - <user2>
# Open mysql and type password when prompted
$ mysql -u root -p
# Create separate MySQL user account
# Replace user2 and password but DO NOT remove the quotes
mysql> CREATE USER 'user2'@'localhost' IDENTIFIED BY 'password';
# Grant previlages
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user2'@'localhost';
mysql> exit
# Create directory for your secondblog
sudo mkdir -p /var/www/secondblog

# Change the ownership
sudo chown <user2>:<user2> /var/www/secondblog

# Set the correct permissions
sudo chmod 775 /var/www/secondblog

# Then navigate into it
cd /var/www/secondblog
# Now install, and answer as below
ghost install

then I started it again with
sudo service nginx start

moved to my
cd /var/www/avsemgaming

and tried to set SSL

# Set SSL
$ ghost setup ssl

# Start Ghost
$ ghost start

There were some questions again and I entered my new domain information when with the setup of SSL.

Now I got this error nginx: [emerg] cannot load certificate “/etc/letsencrypt/”: BIO_new_file() failed

:No such file or directory:fopen(‘/etc/letsencrypt/ ullchain.cer’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

And I have no idea how fix it.
I would appreciate any support on how to fix it properly.
Could you please help?

It’s unclear what you did to add another domain to tour your server. Is it another Ghost website using another config file in /etc/nginx/sites-available?

Likewise, why have you used ghost setup ssl in isolation for a new website?

Please describe what steps you have taken, if you took a snapshot or backup prior to the changes, and what you are trying to accomplish.

@mjw Ok, I updated my description with more information.

And back to your questions
Is it another Ghost website using another config file in /etc/nginx/sites-available?
It should be another website probably with another config file.

Likewise, why have you used ghost setup ssl in isolation for a new website?
I followed the guide that I mentioned before and I got these errors. I didn’t know what was the best way to add a second domain. So now nothing is working.

You have used a guide that is five years old, and likely inaccurate. Always use the official documentation since this is maintained.

Since you have two Ghost instances, make sure each uses a different port; ghost ls will help here. Then amend as previously stated.

Incidentally, it is better to add new content to the thread rather than editing the OP, as this means rereading the thread.

I can see now that this guide is old and it was a bad move to follow it though I couldn’t find an official guide how to do it properly.

I run ghost ls and it is showing only one blog that is running. Also, the ports are different. One is 2368 and another is 2369.

Are there any other solutions that can be applied in this case?

Solution: I uninstalled ghost from a second blog. And then I restarted ngnix. Though I still wonder what’s the official guide to do this properly.

A good starting place is here.

I’m uncertain what steps you have taken, so I suggest you uninstall the instance, and start over with the official guide.