[resolved]Ghost Blog, can not have https links to my own website

Hey,

I have a ghost Blog + website and I just updated my website to the latest ghost version. I use a custom slightly modified version of the casper theme.

I noticed that on my existing pages i can no longer change any links that refer to my domain from their http version to their https version or from absolute url to /path/to/asset (Other domains work fine and I can freely change them)

Furthermore on the design page, I have the same issue. All links are http, and I can’t change them to https or to /path/to/page UNLESS, the domain is not my website.

By “I can’t change” I mean, I can click save/publish but after I leave the page (or the field) it reverts to the previous value.

It’s not a permission issue, as I can modify the web pages, add text, create new pages, etc, just not links to my own website. Any ideas?

EDIT: Solution. Set the url to https in the ghost config? (New option when migrating from 2.X to 3.X?)

ghost config set url https://webfives.com

From: Ghost blog returning images via http instead of https - #2 by badrihippo

Cheers,

Nick

Hi @XapaJIaMnu,

welcome to ghost.
Was SSL properly configured during ghost setup?
You could have a look in your terminal and run $ ghost setup ssl nginx
Also running $ ghost doctor could give more info if something not right with ghost.

Hey @daniel1,

Thank you for your reply. Ghost doctor reports everything is good:

$ ghost doctor
✔ Checking system Node.js version
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies

I think SSL is configured properly, but I have no idea how to tell?

$ ghost setup ssl nginx
Nginx configuration already found for this url. Skipping Nginx setup.
ℹ Setting up Nginx [skipped]
Nginx setup task was skipped, skipping SSL setup
ℹ Setting up SSL [skipped]

Also

$ curl http://my-website.com
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>

And redirects to the https version.

EDIT:
I have both website-ssl.conf and website.conf:

They are:

    if ($host = www.mywebsite.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = mywebsite.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80 ipv6only=on;

    server_name website.com www.website.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 /files {
        autoindex off;
        alias /var/www/files;
    }


    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}

AND the ssl-version:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2 ipv6only=on;

    server_name mywebsite.com www.mywebsite.com;
    root /var/www/ghost/system/nginx-root;
    ssl_certificate /etc/letsencrypt/live/mywebsite.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mywebsite.com/privkey.pem; # managed by Certbot
    include /var/www/ghost/system/files/ssl-params.conf;

    location /files {
        autoindex off;
        alias /var/www/files;
    }

    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 50m;



}

Cheers,

Nick