Search not working

I’ve set up my own Ghost instance on my server.

Upgraded to latest 5.x.

The theme has a search function. When I click it, it just keep spinning and says “No matches found” despite me trying both free text, tags, author’s name etc.

I can’t get the search to work on any theme I try, no matter if it’s third party or Ghost original themes.

Are you able to share a link to your site?

e.g infoplay.se but I have the same problem on all sites I’ve set up.

The site’s set to private, so I can’t see anything additional there. My guess would something going on in the API call. If you open your dev console, do you see any errors?

It’s not set to private. Maybe it was temporarily, but it’s not set to private now.

I don’t see any obvious errors in the front end. What do you see?

It looks like there’s something going wrong with your SSL setup. The site is requesting data from the http version of your site (not https). This is causing search to fail.

How did you set up your site with regard to SSL?

It’s a Bitnami instance on AWS. The SSL is set up using Bitcert (a Bitnami tool setting up Let’s Encrypt) (sudo /opt/bitnami/bncert-tool)

Which brings us to another problem I’m having. If I change the url in config.production.json to https, the whole site stops working. I’m redirected to an IP that is 127.0.0.1 and/or get an infinite redirection resulting in an error loading the site. I’m having the same problem as this guy here.

I can’t help with the Bitnami setup, but if you’re planning on using SSL, your Ghost URL must be configured as https as well.

Unfortunately if this doesn’t work, you’ll have to go down your stack and figure out which component is causing the issue.

What I can say is when you have a reverse proxy in front of Ghost, be sure to include the x-forwarded-proto header - otherwise Ghost has no way of knowing that SSL was terminated.

1 Like