sayem314 / Ghost-over-Caddy

This repo/script will install Ghost blog over Caddy web server as a reverse proxy.
GNU General Public License v3.0
20 stars 5 forks source link

Running script again to make new Ghost site results in errors #2

Closed githubber closed 7 years ago

githubber commented 7 years ago

Hi, great script, very helpful! But I ran into some problems. Running the script a second time made a new Ghost blog, with the new second domain, fine, but the port, 2368, remained the same. I changed that, but the Ghost blog still won't run. I keep getting a '502 Bad Gateway' error, and this error: '12/Jul/2017:06:36:40 -0400 [ERROR 502 /favicon.ico] dial tcp 127.0.0.1:2370: getsockopt: connection refused' I ran the script while logged in as root. I also noticed that both Ghost blogs were made with the same info, such as ghost_num, ghost_user, and ports both 2368, which meant they were both getting served off the first installed blog. I guess I need to manually change these values? Anything else I need to change? Much thanks, Shane

sayem314 commented 7 years ago

Thank you @githubber for reporting. Appreciate for testing out and creating this issue. This has been fixed now, try latest commit please and report back. And I'm sorry for late fix and not adding multiple blog support earlier as I was away for few days from github.

githubber commented 7 years ago

Cool, I'll check out the new script. When using the first version I found that by manually editing the config.js file, and the Caddyfile, to adjust the second Ghost blog's port, it would run, BUT I did have to run 'pm2 start index.js --name ghost2' to make it start up properly.

sayem314 commented 7 years ago

I see. pm2 startup has been fixed too on new version.