Images a broken on login page

Hi

I working on a new forum. But i have a problem with the login page.. Its not showing the image. → https://wpdebat.dk/

But if I right-click on the image and copy the image URL and open the URL the image shows fine

https://www.wpdebat.dk/uploads/default/original/1X/b48583f04a50eea67fe53105d6ff8ae0db8260bd.png

What can be wrong?`

Regards

Thomas

EDIT: i have try 3 browser, and i have try to clear my browser cache!

3 Likes

Hi, you can Force HTTPS in the options:

This will help not to have mixed content http/https.

image

2 Likes

Hi @Arkshine

Thanks for the reply.

After I force HTTPS, my site is broken.

I can’t log in / log out, create posts, save settings, and more..

Then I run

cd /var/discourse
./launcher enter app
rails c
SiteSetting.force_https = false
exit

Then i disable: force HTTPS - Now the site is online Again but the images a broken.

Here are some more details

  • In the app.yml my hostname is: DISCOURSE_HOSTNAME: ‘www.wpdebat.dk’

  • I use Virtualmin as control panel on my server

  • As Webserver is use apache2

  • Ubuntu 24.04

  • I have used this guide @ virtualmin forum

Regards

Thomas

Sorry - Is was update the post above when you reply

Thanks for giving more context.

From what I see, wpdebat.dk works on my side. You have a valid SSL certificate for root and www. You still have mixed content; as the guide says, you need force https to fix that.

Is it wanted to use www.wpdebat.dk instead of wpdebat.dk in DISCOURSE_HOSTNAME?
I don’t know if it can cause an issue, but I would use wpdebat.dk and tell Virtualmin to redirect www → non-www (or the inverse if you prefer to keep www).

1 Like

@Arkshine

Problem Solved - There was a problem with Website Redirects

I removed the www. from the settings, and now i works.

Thanks for the help

1 Like

I see. I’m glad it works now!

Since you’re using www in Discourse config, that would cause trouble.

I would still encourage you to choose between www or non-www, adjust app.yml, and make a redirection in Virtuamin. That should give you SEO benefits (consistency in the URL, preventing content duplication, analytics under a single domain, etc).

1 Like