Systemd: additional site on same server - ghost gone


#1

I did a new install of Ghost using the ghost-CLI on a Digital Ocean Ubuntu droplet.

Very smooth, and everything up and running with SSL from /var/www/dotse
for the man domain, say www.site.se

Then I added an additional site on a subdomain with root dir /var/www/hub for
hub.site.se on the same droplet.

Wrote the nginx hub.site.conf in /sites-available and linked it to /sites-enabled

After a reboot I can not access the Ghost site - niginx kicks everything to the site I added,
ignoring the Ghost systemd service

I’m in way over my head with systemd - I have no idea how to work this.

Using “sudo netstat --tcp --udp --listening --program” I see Ghost on localhost:2368
Do I write a separate .conf for www.site.se installation in /var/www/dotse
and proxy the request like I do on other ghost installations?

here is what I have in /sites-available
hub.site.se
www.site.se-ssl.conf -> /var/www/dotse/system/files/www.site.se-ssl.conf
www.site.se.conf -> /var/www/dotse/system/files/www.site.se.conf

But… there are no config files in /system/files, just a systemd config…
ghost_www-site-se.service
so… I’m lost. Any ideas?

Thanks / magnus


#2

Check to make sure that the two Ghost instances run on different ports. If the first one runs on 2368 then the second one should run on 2369 (and this should be reflected in the nginx config).


#3

The other site is PHP-based, not a Ghost installation (agree, this is not very clear from my post)

I removed the symlinks in /sites-enabled and wrote a separate config for the Ghost site.
Clearly a hack, and I’m writing “learn systemd” on my to-do list…
Thanks anyway!
/magnus


#4

Hey :wave:

You don’t need to learn systemd to manage PHP applications; Node and PHP have very different runtime environments. Look into a PHP process manager, like php-fpm. Something like


might be useful for integrating NGINX and PHP


closed #5

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