Hey :)
I have some trouble setting up my Ghost instance.
When I try to call Ghost via the URL (ghost.schlosser.pw), I only get a “502 Bad Gateway” error message. Therefore I assume that there is a configuration error in the nginx config file on my side.
Could anyone take a look at my config file and help me out? I looked virtually everywhere to find a solution for this, but it seems like solutions that worked for others do not work for me :(
I am running Ghost in a Docker container, and I use nginx locally on my Ubuntu server to act as a reverse proxy plus SSL in combination with Lets Encrypt.
Ghost version: 5.13.2
nginx config:
server {
listen 80;
server_name ghost.schlosser.pw;
location / {
proxy_pass http://127.0.0.1:8081; # The port I assigned the container
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 2 lines below are to avoid Ghost https redirect bug
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
Ghost environment variables:
url: “http://ghost.schlosser.pw”
What is it I am missing here?
Thanks in advance for any help!