User avatars are not displaying

AI-generated summary

In the Self-hosting category, user drazisil reported that uploaded user avatars were displaying as broken images, with the hostname incorrectly appearing in the middle of the URL. They suspected an issue with their app.yml configuration. Other users identified the root cause: Discourse does not support non-standard ports. Falco advised using ports 80 or 443, while codinghorror confirmed that any other port indicates a misconfigured installation. drazisil realized they had misunderstood the port mapping in their Docker setup and planned to revert to the default configuration. Falco added a cautionary note about using long-running connections under Apache. drazisil clarified they were using Docker and thanked the helpers for the assistance.

Trying to get user avatars working. The default letter ones work.

When I upload, I get no errors, but the images are broken / do not exist.

The image url is in this format: http://forum.mcouniverse.com:8080/user_avatar/forum.mcouniverse.com:8080/drbrown/25/20_1.png

which seems very strange that the hostname is in the middle of the url. I tried removing that, no change.

I have also double-checked the hostname in app.yml, and rebuilt the app.

Any thoughts?

As an example:

Discourse doesn’t support running on a non standard port, so choose 80 or 443.

(ps: choose 443 with free ssl)

Hm, will try that. isn’t 8080 the default though? I don’t remember changing it.

Something is wrong with your install if any port other than default is showing.

I likely misunderstood how the 8080:80 mapping in app.yml worked. I’ll set it back, rebuild and adjust my apache config

If you are running under apache you need to be extra careful because of long running connections. There are some topics about it here on meta.

It’s running under docker, just needed to have a crash course in mod_proxy :slight_smile:

Thank you for the help @Falco and @codinghorror