Will NGINX automatic config overwrite my existing NGINX config?

Hey guys! I’m new to Ghost and was wondering if the existing NGINX config would be overwritten if I pressed yes when it asked to configure NGINX.

Welcome to the Ghost community, @Raeed.

What existing Nginx config ate you referring to? A file in sites-available or something else?

Moreover, is Ghost replacing an existing website and domain, or something new?

It is helpful to provide relevant information about your host etc.

My website already has a custom NGINX configuration and also I host it on my own servers. Ghost is replacing an existing domain. and yes I am referring to the sites enabled folder.

You need to edit your docker.compose.yml file to disable exposing and route traffic from your own Nginx instance.

Sorry I get confused with Discourse (we are using both apps).

The OP doesn’t mention using a Docker container, so this isn’t relevant.

@Raeed, a couple more questions. Is Ghost replacing the existing server using the (bare?) domain, or is it running alongside the existing server, e.g., using a subdomain?

Likewise, do you have SSL certificates for the domain Ghost will use, or do you want Ghost to generate Let’s Encrypt certificates?

Hi there,

First off, I would like to mention that Docker is not being used. Ghost is going to be in its own subdomain, the reason I don’t want it to overwrite the NGINX config is that there is another app on there that is separate. The current NGINX config has everything set up, I can issue a LetsEncrypt certificate manually but it would be preferred if Ghost can set it up for me. I wanted to know if it’s safe to let Ghost make an NGINX config, will they make a new file or will they overwrite the existing config located in sites-enabled/default, if they make their own file separate from my app its fine, but I don’t want it to overwrite any of my files, I just want it to make its own files and setup that way so my configuration isn’t affected.

If you’re using the bare domain for the existing server block, and you setup Ghost as a subdomain, it will create a new config file in sites-available, plus a symbolic link to sites-enabled.

Use the guide pasted below to setup Ghost with a subdomain.

Finally, I recommend you take a snapshot of your DO droplet before proceeding. In addition, you can make a backup of the existing config files in sites-available since these won’t be linked in sites-enabled, and therefore, won’t be part of the Nginx configuration.

Okay, thank you so much, sir!

1 Like