# Ghost serves images over HTTP randomly causing chrome warnings

**URL:** <https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932>\
**Category:** Developer help\
**Created:** [December 22, 2019, 1:02pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932 "2019-12-22T13:02:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![WAINGOR](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/waingor/32/6103_2.png) [@WAINGOR](https://forum.ghost.org/u/WAINGOR)\
**Post date:** [December 22, 2019, 1:02pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/1 "2019-12-22T13:02:47Z")

</div>

Hello all,

After setting up my SSL cert on [www.fastcomet.org](http://www.fastcomet.org) I am getting warnings on some pages due to mixed content being served. The error makes sense:

- The page is served over https, however it requests images over http.
- Also, “A cookie associated with a resource at [http://ethical-business-principles.com/](http://ethical-business-principles.com/) was set with `SameSite=None` but without `Secure`”

It seems to me that Ghost should have some configuration set so that all is run/served in HTTPS mode. The weird thing is this:

- issues with http-requested img’s seem to occur on **pages** , not posts. However, on the page  
[https://ethical-business-principles.com/creative-commons/](https://ethical-business-principles.com/creative-commons/) one image is correctly loaded (over https) and the other incorrectly (http), so Ghosts behaviour seems to be inconsistent…

More info/context

- Version: Ghost 3.2.0
- Config (site is running in development mode so this is config.development.json:

```auto
  GNU nano 2.0.9 File: config.development.json

{
  "url": "https://ethical-business-principles.com/",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "/home/erikstes/public_html/content/data/ghost-local.db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "local",
  "paths": {
    "contentPath": "/home/erikstes/public_html/content"
  }
}

```

- Google Chrome browser
- When I try to run ghost setup ssl in the server terminal I get the following error:

```auto
Found a development config but not a production config, running in development mode instead
Nginx config file does not exist, skipping SSL setup

```

However, my setup includes Apache, not Nginx. Is there any docs on how to set Apache up correctly?

---

<div class="post-metadata">

**Author:** ![WAINGOR](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/waingor/32/6103_2.png) [@WAINGOR](https://forum.ghost.org/u/WAINGOR)\
**Post date:** [December 22, 2019, 2:56pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/2 "2019-12-22T14:56:30Z")

</div>

Meanwhile this problem has been solved. I needed to restart Ghost which I did not do after changing my json config file. After that I needed to remove and re-add some posts and pictures in order for https to fully work

---

<div class="post-metadata">

**Author:** ![Diego](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diego/32/7070_2.png) [@Diego](https://forum.ghost.org/u/Diego)\
**Post date:** [January 30, 2020, 5:56pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/3 "2020-01-30T17:56:29Z")

</div>

Hi Waingor, I’m having the same issue in fastcomet, can you tell me if you could solve it and how?

Thank you!

---

<div class="post-metadata">

**Author:** ![WAINGOR](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/waingor/32/6103_2.png) [@WAINGOR](https://forum.ghost.org/u/WAINGOR)\
**Post date:** [January 30, 2020, 6:14pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/4 "2020-01-30T18:14:26Z")

</div>

Check my last post in this thread : ) That’s what I did. Also make sure that you dont have any hard coded HTTPS url’s in your posts / page URLs. If the problem persists and it seems to be theme related: contact the creators of maxim, you can find their details on theme forest. They are cool and respond very quickly. Good luck Diego

---

<div class="post-metadata">

**Author:** ![Diego](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diego/32/7070_2.png) [@Diego](https://forum.ghost.org/u/Diego)\
**Post date:** [January 30, 2020, 9:33pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/5 "2020-01-30T21:33:42Z")

</div>

Hey Waingor, I told fastcomet that the problem was the install of ghost was made using the HTTP url and ask them if they could change it for the HTTPS. They did, and everything was fixed.

Thank you!

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/denvergeeks/32/7401_2.png) [@denvergeeks](https://forum.ghost.org/u/denvergeeks)\
**Post date:** [April 10, 2020, 9:01pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/6 "2020-04-10T21:01:17Z")

</div>

@Diego I’m on FastComet too, but I’m not seeing the change… could you please spin up a fresh Ghost instance and then look at the **url:** initially set in the **config.development.json** file?

I did on just now and here is the **config.development.json** file:

 ![test](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/7/7d4a82bd57dee0967272de9b08cbb68ccb70477e.png)

---

<div class="post-metadata">

**Author:** ![denvergeeks](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/denvergeeks/32/7401_2.png) [@denvergeeks](https://forum.ghost.org/u/denvergeeks)\
**Post date:** [April 10, 2020, 9:03pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/7 "2020-04-10T21:03:29Z")

</div>

Here is how I fix this. (I simply edit my Ghost site files in [the browser-based File Manager of my cPanel-hosted Ghost sites](https://ghost-o-matic.com/my-ghost-dev-tools/).)

(Also note that after making the below change, you may need to Restart your Ghost and/or possibly also re-upload the offending images in your posts to reset the URLs in the database.)

Anyhoo, this first block of code below shows the entire contents of the **config.development.json** file in the root directory of my Ghost site.

Here you can see that that the **“url”:** was (by default, at the time of installation) set to **http** instead of **https** (as it should be, to prevent a bunch of glitchy error notices i.e. images and other content links either not working, or redirecting to https paths):

```
{
  "url": "http://keeper.gwarp.com/",
  "server": {
    "port": 2379,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "/home/gwarp/KEEPER/content/data/ghost-local.db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "local",
  "paths": {
    "contentPath": "/home/gwarp/KEEPER/content"
  }
}

```

In this second block of code you can see that I’ve just changed **http** to **https** (while leaving everything else as-is):

```
{
  "url": "https://keeper.gwarp.com/",
  "server": {
    "port": 2379,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "/home/gwarp/KEEPER/content/data/ghost-local.db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "local",
  "paths": {
    "contentPath": "/home/gwarp/KEEPER/content"
  }
}

```

---

<div class="post-metadata">

**Author:** ![make\_believe](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/make_believe/32/18545_2.png) [@make\_believe](https://forum.ghost.org/u/make_believe)\
**Post date:** [July 14, 2022, 12:26pm UTC](https://forum.ghost.org/t/ghost-serves-images-over-http-randomly-causing-chrome-warnings/10932/8 "2022-07-14T12:26:13Z")

</div>

HAHAHA this is pure comedy for me.

Images serving over HTTP instead of HTTPS? That’s 100% because of the incorrect way fastcomet runs ghost on their shared hosting environment. My god. Stop recommending it, stop using it for ghost.
