Ghost showing default site

Then you have to point your nginx config to those folders as home folders, i.e. /var/www/ghost-news for the ghost news site.

Not sure why you chose to complicate the home folder adding system/nginx-root to it (unless you have some other important folders in that path that you do not want to be accessible from the internet). But if that is the case, Ghost should have been installed in /var/www/ghost-news/system/nginx-root/ instead of /var/www/ghost-news/.

I have not done it. It is automatically during ghost installation.

Uhm, strange. I have to agree I have not installed a Ghost with all its default options as I have always chosen to setup my own nginx config files so I am not sure how the standard Ghost install procedure creates the nginx conf file. And my configs look like this:

For domain1:

root /srv/www/domain1;
index index.php index.html;

location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass         http://127.0.0.1:2369;
}

For domain2:

root /srv/www/domain2;
index index.php index.html;

location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass         http://127.0.0.1:2370;
}

As you can see, the nginx home points to the web root folder of the website (where I also ran the ghost install commands).

Finally installed it successfully as different blog news.techhelper.me
Thanks guys for your help.

What did you differently?

Creating a second folder and running ghost install should have “Just worked™️” so I’m curious what caused the redirect from one to the other…

All of the configurations posted here look spot on :thinking:

Only think I can think of is needing to mark one as the default_server.

I think that was because of port misconfigurations and i just uninstalled ghost from that folder and deleted that folder and made a new one and ran the ghost install command and it worked fine.

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