-
What’s your URL?
https://in-spired.xyz -
What version of Ghost are you using?
v3.41.3 -
How was Ghost installed and configured?
I am using Nginx and Docker. I’m not all there with web application stuff but I followed this guide:
Run your blog with Ghost, Docker and LetsEncrypt -
What Node version, database, OS & browser are you using?
Linode Ubuntu 20.04
Browser I use primarily is Chrome
Node v12.19.1 -
What errors or information do you see in the console?
Not specifically errors… I’m just struggling to identify my web root which is making it impossible to renew my letsencrypt certificate. -
What steps could someone else take to reproduce the issue you’re having?
I run my letsencrypt renewal command and it asks for my web root. No problem, I thought. It’s at /home/inspired/ghost/content which is linked to /var/lib/ghost/content on my docker. So the challenge is made to https://in-spired.xyz/.well-known/acme-challenge/{random_string} to check if the site is active. But it can’t find that file. So I’m trying to identify where the actual web root is to put that folder and file there so that the challenge will succeed. I’ve got myself in such a muddle, I’d rather not reinstall the whole thing but I can’t see a way around this now and I’m not that good at web sort of stuff. I just followed the instructions in that blog post to set it up originally and it worked fine until I tried to renew my certificate.
I thought maybe I could put a file in the /var/lib/ghost/content/themes/casper/{file_here} and then access it through my browser. So I put a test.txt in that folder, but it redirects me to /test.txt/ rather than accessing the file.
If anyone has any idea where my true web root is… or has any experience with using it via Nginx and Docker i’d be most appreciative… Been stuck trying to fix it for two days, hence the eventual forum post. Probably being really stupid.
Nginx Configuration
root@localhost:/etc/nginx/conf.d# cat default
server {
listen 80;
server_name in-spired.xyz;
location /.well-known/ {
root /var/www/in-spired.xyz/.well-known/;
}
location / {
return 301 https://$server_name$request_uri;
}
}
server {
server_name in-spired.xyz;
listen 443 ssl;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
ssl_certificate /etc/letsencrypt/live/in-spired.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/in-spired.xyz/privkey.pem;
ssl on;
}
root@localhost:/home/inspired/ghost/content/themes# ls -la
total 8
drwxr-xr-x 2 ubuntu ubuntu 4096 Feb 2 14:26 .
drwxr-xr-x 8 ubuntu ubuntu 4096 Feb 2 08:23 ..
lrwxrwxrwx 1 ubuntu ubuntu 44 Jan 31 18:09 casper -> /var/lib/ghost/current/content/themes/casper
root@localhost:/home/inspired/ghost/content/themes#
Inside the docker
root@75d1ecb29b92:/var/lib/ghost/content/themes/casper# ls -la
total 300
drwxr-xr-x 4 node node 4096 Feb 2 14:44 .
drwxr-xr-x 3 node node 4096 Feb 2 14:33 ..
-rw-r--r-- 1 node node 1065 Oct 26 1985 LICENSE
-rw-r--r-- 1 node node 2895 Oct 26 1985 README.md
drwxr-xr-x 5 node node 4096 Feb 2 14:33 assets
-rw-r--r-- 1 node node 2480 Oct 26 1985 author.hbs
-rw-r--r-- 1 node node 5934 Oct 26 1985 default.hbs
-rw-r--r-- 1 node node 968 Oct 26 1985 error-404.hbs
-rw-r--r-- 1 node node 2597 Oct 26 1985 error.hbs
-rw-r--r-- 1 node node 5244 Oct 26 1985 gulpfile.js
-rw-r--r-- 1 node node 3079 Oct 26 1985 index.hbs
-rw-r--r-- 1 node node 2495 Oct 26 1985 package.json
-rw-r--r-- 1 node node 2161 Oct 26 1985 page.hbs
drwxr-xr-x 3 node node 4096 Feb 2 14:33 partials
-rw-r--r-- 1 node node 8394 Oct 26 1985 post.hbs
-rw-r--r-- 1 node node 1117 Oct 26 1985 tag.hbs
-rw-r--r-- 1 node node 5 Feb 2 14:44 test.txt
-rw-r--r-- 1 node node 220823 Oct 26 1985 yarn.lock
root@75d1ecb29b92:/var/lib/ghost/content/themes/casper#