תמונות שבורות בדף ההתחברות

סיכום מבוסס בינה מלאכותית

User Taxick reported that images on the login page of their Discourse forum at wpdebat.dk were not displaying, though the image URLs worked when opened directly. Arkshine suggested enabling Force HTTPS to resolve mixed content issues, but this broke site functionality for Taxick, forcing them to revert the setting. Further troubleshooting revealed the issue stemmed from inconsistent hostname configuration — using www.wpdebat.dk in DISCOURSE_HOSTNAME while the site also served wpdebat.dk. Taxick resolved the problem by removing www. from the settings, restoring image display. Arkshine advised choosing either www or non-www consistently, updating app.yml, and setting up a redirect in Virtualmin for SEO and analytics consistency. The root cause was misconfigured domain redirects and mixed content due to hostname mismatch.

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!

Hi, you can Force HTTPS in the options:

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

image

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

סליחה - עדכנתי את הפוסט למעלה כשאתה עונה

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).

[ציטוט=“Arkshine, פוסט:7, נושא:361288”]
במקום wpdebat.dk ב-DISCOURSE_HOSTNAME?
אני לא יודע אם זה עלול לגרום לבעיה, אבל הייתי משתמש ב-wpdebat.dk ומספר ל-Virtualmin ל…
[/ציטוט]

@Arkshine

הבעיה נפתרה - הייתה בעיה בהפניות האתר

הסרת את ה-www. מההגדרות, ועכשיו זה עובד.

תודה על העזרה

אני מבין. שמח שזה עובד עכשיו!

מאחר שאתה משתמש ב-www בהגדרות Discourse, זה עלול לגרום לבעיות.

אני עדיין מעודד אותך לבחור בין www או non-www, להתאים את app.yml, ולבצע הפניה ב-Virtuamin. זה ייתן לך יתרונות SEO (עקביות ב-URL, מניעת כפילות תוכן, ניתוח תחת דומיין אחד, וכו’).