Current state of the blog:
Nginx end of things:
2019/01/28 05:32:54 [error] 772#772: *27 connect() failed (111: Connection refused) while connecting to upstream, client: _IP_ADDRESS_, server: _MY_DOMAIN_.com, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:2369/", host: "_MY_DOMAIN_.com
Ghost end of things (ghost run):
[2019-01-28 05:32:13] INFO Ghost is running in production...
[2019-01-28 05:32:13] INFO Your blog is now available on https://_MY_DOMAIN.com/
[2019-01-28 05:32:13] INFO Ctrl+C to shut down
[2019-01-28 05:32:13] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-01-28 05:32:13] WARN Tries: 0
[2019-01-28 05:32:13] WARN Retrying...
[2019-01-28 05:32:13] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-01-28 05:32:13] WARN Tries: 1
[2019-01-28 05:32:13] WARN Retrying...
[2019-01-28 05:32:13] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-01-28 05:32:13] WARN Tries: 2
[2019-01-28 05:32:13] WARN Retrying...
[2019-01-28 05:32:14] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2019-01-28 05:32:14] INFO Ghost boot 3.07s
Current configuration(s):.
config.production.json
{
"url": "https://_MY_DOMAIN.com/",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "mysql",
"connection": {
"host": "localhost",
"user": "ghost",
"password": "CENSORED",
"database": "CENSORED"
}
},
"mail": {
"transport": "Direct"
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/var/www/ghost/content"
},
"bootstrap-socket": {
"port": 8000,
"host": "localhost"
}
}
MYDOMAIN-ssl.conf:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name _MY_DOMAIN_.com;
root /var/www/ghost/system/nginx-root;
ssl_certificate /etc/letsencrypt/_MY_DOMAIN_.com/fullchain.cer;
ssl_certificate_key /etc/letsencrypt/_MY_DOMAIN_.com/_MY_DOMAIN_.com.key;
include /etc/nginx/snippets/ssl-params.conf;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2369;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 62m;
}
MYDOMAIN-.conf:
server {
listen 80;
listen [::]:80;
server_name _MY_DOMAIN_.com;
root /var/www/ghost/system/nginx-root;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2369;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 62m;
}
Attempts:
- I tried killing and searching for all node processes, there were none when ghost wasnβt running.
- Restarting nginx.
- No processes appear to be occupying that port.
- Multiple server restarts.
- Ghost run, ghost start, ghost restart, ghost stop in every possible order.
- Updating ghost: Apparently succeeded(?) output:
guser@blog:/var/www/ghost$ ghost upgrade
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run `npm install -g ghost-cli@latest` to upgrade.
+ sudo systemctl is-active ghost_localhost
β Checking system Node.js version
β Ensuring user is not logged in as ghost user
β Checking if logged in user is directory owner
β Checking current folder permissions
β Checking folder permissions
β Checking file permissions
β Checking content folder ownership
β Checking memory availability
β Checking for available migrations
β Checking for latest Ghost version
β Downloading and updating Ghost to v2.12.0
β Linking latest Ghost and recording versions
+ sudo systemctl is-active ghost_localhost
β± Downloading and updating Ghost to v2.12.0 > Installing dependencies > [5/5] Building fresh packages...β Ensuring user is not logged in as ghost user
β Checking if logged in user is directory owner
β² Restarting Ghostβ Checking current folder permissions
+ sudo systemctl is-active ghost_localhost
β Validating config
β Checking folder permissions
β Checking file permissions
β Checking content folder ownership
+ sudo systemctl start ghost_localhost
β Restarting Ghost
βΉ Removing old Ghost versions [skipped]
guser@blog:/var/www/ghost$ ghost status
+ sudo systemctl is-active ghost_localhost
βββββββββββββ¬βββββββββββββββββ¬ββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββ¬ββββββββββββββββββ
β Name β Location β Version β Status β URL β Port β Process Manager β
βββββββββββββΌβββββββββββββββββΌββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββΌββββββββββββββββββ€
β localhost β /var/www/ghost β 2.12.0 β running (production) β https://_MY_DOMAIN_.com/ β 2368 β systemd β
- Updating ghost-cli: clearly did not succeed (https://dpaste.de/x3Sp/raw).
- npm start --production
guser@blog:/var/www/ghost$ npm start --production
npm ERR! path /var/www/ghost/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/var/www/ghost/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/guser/.npm/_logs/2019-01-28T05_53_42_695Z-debug.log
Status still the same.