mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 77 forks source link

I can't open the picture #329

Closed AnjeiKozhev closed 5 months ago

AnjeiKozhev commented 9 months ago

Hi! I'm using the latest stable image. The HUMHUB_HOST variable is not set, meaning localhost is used. Everything seems to be working; when adding a picture to the news, it is added, but is not displayed with the URL Request error: http://localhost/file/file/download?guid=c2962c90-04e0-4cc4-90a8-6bbd9ceeeb9d&hash_sha1=52e3cde5 I understand that she won’t respond to such an address. But how can this be changed? Thanks.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

mriedmann commented 8 months ago

There seems to be something off with the URL /file/file ... maybe there is something wrong with your Host setting inside Humhub. Also, please try using the latest version (release yesterday).

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 30 days with no activity.

mriedmann commented 6 months ago

During my tests for #335 I discovered a problem with FastCGI and the url generation ... If you manually replace the url with http://localhost:8080 (or however you have started humhub) it should show you your picture. I am currently not sure how to solve this because it seems like a Humhub bug, but I can't really find any reported issues, so maybe I am just missing something.

@jvies: Any ideas?

mriedmann commented 6 months ago

On by setup it was a wrong combination of those 2 variables:

For "normal" setups:

HUMHUB_PROTO: 'https'
HUMHUB_HOST: 'humhub.mydomain.example'

For local setups like the docker-compose.yml (most likely):

HUMHUB_PROTO: 'http'
HUMHUB_HOST: 'localhost:8080'

Maybe check that this is correctly configured for your hosting situation.

(and currently it seems that we are not handling the "HUMHUB_HOST not set" scenario as expected => you might have to set it regardless of localhost or not)

mriedmann commented 6 months ago

Ok I think I am not getting whats going on => Not setting HUMHUB_HOST works as expected IF the config was not already written. Setting it later does nothing if you are using a volume or mount to persist the config (as used in the docker-compose).

Take a look at the rendered config files (/var/www/localhost/htdocs/protected/config/{web.php|common.php}). There might be a hostname left set.

All other features are working surprisingly well with 1.15. So if you want to use dynamic hostnames just remove the HUMHUB_HOST variable before first bootup or manually remove the host from the common.php config. This should help.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.