When installing ghost using the Ubuntu docs I receive an error on "ghost install"

From /etc/nginx/sites-available/Aidan-a.me.conf

    listen 80;
    listen [::]:80;

    server_name aidan-a.me;
    root /var/www/home/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    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;
        proxy_pass http://127.0.0.1:2368;
        
    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}

From /etc/nginx/sites-available/Aidan-a.me-ssl.conf

    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name aidan-a.me;
    root /var/www/home/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    ssl_certificate /etc/letsencrypt/aidan-a.me/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/aidan-a.me/aidan-a.me.key;
    include /etc/nginx/snippets/ssl-params.conf;

    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;
        proxy_pass http://127.0.0.1:2368;
        
    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 1g;
}

Let me know if this is not what your looking for and I can try and find the files and things you need/want.

Edit /etc/nginx/sites-available/Aidan-a.me.conf to:

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

    server_name aidan-a.me;
    return 301 https://aiden-a.me$request_uri;
}

Then execute nginx -t to check for errors, and if okay, run sudo nginx reload.

So you want the file to look like this?

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

    server_name aidan-a.me;
    return 301 https://aiden-a.me$request_uri;
    root /var/www/home/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    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;
        proxy_pass http://127.0.0.1:2368;
        
    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}

If so I will apply these changes and run the commands above and try to access my site

No, just what I pasted. Only SSL connections proxy pass to Ghost.

updated the file. I get this when I run the nginx -t command.

root@website:~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@website:~# 

Is this what you’re looking for? If so I’ll run sudo nginx reload in my ssh.

Yes, it’s fine to reload Nginx.

After doing as told, and trying to load the page I either go to the nginx page or the a blank page.

I have the orange proxy cloud enabled on Cloudflare If this changes anything.

Place Cloudflare in development mode, as this bypasses their cache. However, I note that your web server is handling www.aidan-a.me on the default server. I’d remove this from the config: rm /etc/nginx/sites-enabled/default, then check (nginx -t) and reload (sudo nginx reload.)

I see the issue: I spelled your site as aiden-a.me not aidan-a.me. So, amend the config file, and reload Nginx.

Incidently, always check any code before pasting as there may be errors, whether human or caused by rendering.

I fixed the code error and ran the commands above. Now when I visit my site(https://aidan-a.me) I get an

when I try and visit via https://www.aidan-a.me It redirects me to aidan-a.me with this error.

This looks like a DNS issue (the other is likely browser caching.

Does Cloudflare handle your DNS? It would seem that there is no A-record for your domain (only WWW.)

I use Cloudflare for my domain names. I have 2 dns records one to www and one to @
When I remove the default, a new default gets created.

Your host is unreachable.

Please confirm that you have an A record like this:

A    aiden-a.me    <IP address of the VPS*>    Proxied    Auto

*This is the origin IP address, and what you use to access SSH.

I have pointed the ip of the vps to my dns records via a record.


Can you switch over to Development mode, so all I can see is Cloudflare proxy IPs.

Nonetheless, error 1016 is a Cloudflare error, and this means Cloudflare can’t see the origin server. Therefore, double check your DNS.

ok I have had development mode enabled and the ip addresses are correct. I can try to remove Cloudflare proxy cloud on my @ dns record and www dns record.

Development mode does the same, only temporarily.

I’m now getting many redirects. Please confirm what files are in /etc/nginx/sites-enabled, and that you did reload Nginx after changes the setup each time.

This is what is located in this folder location. I did reload nginx after each change made.

After having issues, I have moved to cloudron to install ghost and my site works now.

Hi all. He wants to install Ghost on a digitalocean, but it turned out to be not as easy as it is written in the instructions.
The droplet installed, went to the console as the root user, and then nothing happens. It’s just that the console is waiting for a command from me, and the instructions say that the droplet will continue the installation itself.
What need to do?