Upload-Pfade haben Port 80, aber Protokoll ist https

Recently I restored my long running discource instance to new one.

My discource version are 3.6.0.beta2-latest.

Now I have problem that uploads do not works .

When I look into browser console i see lot of net::ERR_SSL_PROTOCOL_ERROR errors.

When I take look at network tab i see that chrome trying to fetch url

https://forum.robot.ba:80/uploads/default/optimized/4X/7/2/b/72be8d09005292d2f7ac37158b6d728a063f79ed_2_32x32.png

If I manually remove port 80 or change protocol from https to http and I can open link manually in new browser window.

Any idea why my discource instance adding :80 to upload paths ?

I did search site settings for force https but seems that that is not tuned on or that settings does not exist anymore.

Is is something wrong inside my app.yml file i have following templates:

(I want to use letsencrypt since i do not have my SSL cert)

templates:

“templates/postgres.template.yml”

“templates/redis.template.yml”

“templates/web.template.yml”

“templates/web.ratelimited.template.yml”

Uncomment these two lines if you wish to add Lets Encrypt (https)

“templates/web.ssl.template.yml”

“templates/web.letsencrypt.ssl.template.yml”


1 „Gefällt mir“

You can check out this guide for setting up HTTPS with Let’s Encrypt:

Possible Cause: Hidden “Port” Setting

Sometimes a hidden port site setting remains in the database after migration or restore.
This can cause Discourse to append an incorrect port (like :80) to HTTPS URLs.

To check and fix it:

  1. Enter your container:
./launcher enter app
  1. Open the Rails console:
rails c
  1. Check the current value:
SiteSetting.port
  1. If it returns 80, clear it:
SiteSetting.port = ""
  1. Then rebake all posts and assets to update links:
Jobs.enqueue(:rebake_all_posts)
2 „Gefällt mir“