My name is Michael and I am a fairly new Ghost convert. I am operating a blog running on version 1.22.4 with the latest version of the Ghost CLI. My blog is located at https://whenimbetter.com/ and is the only thing found on the domain.
I also operate a second website (https://mj94.net) that serves mostly as a file dump for me, though I plan to put something on the root domain in the future.
If anyone could offer any assistance to me regarding how to best complete this process, I would be very appreciative.
In summary:
I am currently running Ghost on my VPS running nginx on Ubuntu 16.04 LTS. It can be found at https://whenimbetter.com. Ghost is the only thing utilizing this domain.
I have a second domain (https://mj94.net) that currently hosts several folders and files on the same VPS. I would like to set up a second Ghost blog that points at https://blog.mj94.net.
Thank you. Please let me know if you have any questions or if I can elaborate further.
You don’t need to adjust the nginx config. Installing a second instance should be the same difficulty as installing your first instance (the CLI finds the next open port if 2368 is taken)
It highly depends if you only run Ghost on that server or other websites as well (I, for example, run multiple websites on the same server, some with php-fpm). If your nginx config listens on the default ports of 80 and 443 you need to tell it to proxy to the different Ghost ports in order for the Ghost installs to be available to the world wide web (also if you manually config the nginx).
Could be that easy , but I didn’t dare let Ghost set up my nginx (was afraid it might want to treat it as a single site installation) so I worked with manual configurations.
Also, I had issues with the user setup as well as I run nginx under an nginx user and I had to setup Ghost under a different (sudo) user and this made me have the Ghost installation folders with different ownership as compared to the other websites (which were all under nginx user).
So, what you’re saying, @vikaspotluri123, is I shouldn’t worry about the config? I should just install a new Ghost instance in the same place I installed it for WIB?
That’s right, you shouldn’t need to edit any nginx configuration files, if you trust the CLI
Assuming you have your current blog instance at /var/www/blog-whenimbetter/ghost, following that name scheme, you need to create an empty directory at /var/www/blog-mj94/ghost and run ghost install in that directory - everything will be setup for you, similar to how whenimbetter was setup.
It looks like you copied blog-whenimbetter to blog-mj94 - you don’t want to do this since this would copy whenimbetter-specific configuration over to mj94.
With regards to configuration, the reason you don’t need to modify nginx is because you’re serving (in the eyes of nginx) from 3 separate domains. If you were to serve this new instance from (for example) mj94.net/blog, you would need to modify the nginx configuration manually, because of the way nginx configuration works - you can’t configure the same domain multiple times (and subdomains are not the same thing as domains)
Great, thank you! Thanks for confirming that before I did it; I appreciate your help.
Right, that’s what I assumed—I was planning to manually configure it for the MJ94 blog, but your way (in theory) sounds easier.
I successfully installed it again, but realized in doing so, I broke my WIB install. WIB’s original install location was /var/www/ghost. By moving it to /var/www/blog-whenimbetter/ghost, I break subpages/links.
Is there a way I can properly move WIB’s /var/www/ghost to /var/www/blog-whenimbetter/ghost so that I can separate the two installs once MJ94 Blog is installed in /var/www/blog-mj94/ghost?
Once I’m able to seperate the two in their respective folders, I’ll be set to go! :)
I don’t know of an easy way to do this - The cli currently symlinks system files (see #469) so moving the installation directory would break those links.
My current functional blog is located in /var/www/ghost. Where would I install a new instance of Ghost to be able to have a second blog?
I can’t move the folders to separate the two, and when I try to install a second instance in /var/www/ghost, I’m told that because the current directory isn’t empty (because WIB’s Ghost is there), I can’t install another instance.
Basically, what I’m asking is: since we can’t move the files, where can I install a separate instance of Ghost that will work independently of my first and won’t overwrite it?
Thanks! Everything worked great. I may even reinstall my first blog and move it to ~/whenimbetter.com/blog, just so it’s a part of the same naming scheme as my new one at ~/mj94.net/blog, but that’s a project for another day.
Once I installed Ghost, created a new nginx config file, and set up Certbot, all was well!