Configuration between nginx and Ghost

I’m trying to setup Ghost to run on an Azure virtual machine. The browser on my local machine displays an ERR_CONNECTION_REFUSED error when I try to hit the site.

I’m using ubuntu 20.04 and Ghost CLI/Ghost versions 1.18.0/4.21.0.

The virtual machine has a public IP which I will signify with ‘X.X.X.X’

During the installation, when it asked for a URL, I entered ‘https://X.X.X.X’ I’ve also tried installing using ‘localhost’ and using a domain but have gone back to using the public IP during my latest attempt at installing, trying to get things to work.

The first ten lines of config.production.json looks like this:

“url”: “https://X.X.X.X”,
“server”: {
“port”: 2368,
“host”: “”
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “localhost”,

The first thirteen lines of the .conf in /etc/nginx/sites-enabled/ looks like this:

server {
listen 80;
listen [::]:80;

server_name X.X.X.X;
root /var/www/ghost/system/nginx-root; # Used for SSL verification (

location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;

Before I modified the nginx.conf file, it was serving the default ‘Welcome to nginx’ page.

Any ideas on what I might be missing are greatly appreciated. Thank you!

I forgot to mention that the instructions I used to get things up and running were the general installation instructions:

Also, perhaps worth mentioning, is that this is a fresh virtual machine. There was nothing else installed or run before beginning this process.