404 for svg-sprite on localhost:8000

Hello. I am running a new discourse instance with the relevant config:

hostname =  localhost:8000
relative_url_root = /forum

Some of the resources are not loading. For example the following gives a 404 error:


If, however, I manually change the url to `/svg-sprite/localhost/…’ it loads.

Why aren’t you using port 80?

Publishing on nonstandard ports isn’t supported.

Because I am just testing it locally and have other stuff on port 80. I did eventually find a fix, by adding this to nginx.conf:

rewrite /forum/(svg-sprite|user_avatar)/([^/]+):[0-9]+/(.*) /forum/$1/$2/$3;