Ghost Self-Hosted setting up SSL - How to force 443 listen?

#1
  • What version of Ghost are you using? 2.19.3
  • What configuration? On a ubuntu VM.

First time setup. When I go through ghost-cli, it prompts me to set up SSL, I don’t want to do that, since I’m having another pc nginx reverse proxy through lets encrypt already. The thing is, if I set my blog url to https://blog.domain.com for example, ghost still sets up to listen on port 80. How do I force it to listen on 443 without LE config? Is it possible?

If this helps make it clearer, I just want ghost to listen on 443, without any LE config or anything special, because another nginx host is going to be the reverse proxy for it (that can grab a cert for the domain I want).

#2

Gave up and used DigitalOcean one-click. Much easier than trying to figure out what all the ghost-cli does and how it works on the backend.

#3

I don’t think Ghost listens up to port 80, but rather your webserver (nginx or whatever you use). Ghost listens to port 2368 and you need to proxy your webserver to forward to that port. For example, I installed manually Ghost on my Ubuntu VPS and I have configured my own nginx to listen to 80 & 443 and proxy to 2368.

For example:

server {
    listen 80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

and the Ghost part:

location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass         http://127.0.0.1:2368;
}

You can see more faq’s here:

closed #4

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