# Geen submap-voorvoeging voor sommige bronnen

**URL:** <https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491>\
**Category:** Self-hosting\
**Created:** [26 september 2020 om 23:43 UTC](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491 "2020-09-26T23:43:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tdiam](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tdiam](https://meta.discourse.org/u/tdiam)\
**Post date:** [26 september 2020 om 23:43 UTC](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491/1 "2020-09-26T23:43:36Z")

</div>

Version: v2.6.0.beta2  
Setup: Subfolder `/forum/discourse` setup running on Docker w/ Apache reverse proxy on host `/forum/discourse`

I have followed the instructions [here](https://meta.discourse.org/t/subfolder-support-with-docker/30507) for the subfolder setup and the installation works fine.

However, some resource URLs are not correctly prefixed and lead to 404s. For example, the URL for the default header logo should be `/forum/discourse/images/discourse-logo-sketch.png` but Discourse uses `/images/discourse-logo-sketch.png`.

I’m not quite familiar with the codebase but I think that this should be solved by wrapping `application_logo_url` with `UrlHelper.absolute()` [here](https://github.com/discourse/discourse/blob/v2.6.0.beta2/app/helpers/application_helper.rb#L292).

I will add to the topic if I find any other instances of the problem. Let me know if this is indeed an issue or if I’m doing something wrong. I’d be more than happy to submit a PR.

> **app.yml**
>
> ```plaintext
> templates:
> - "templates/postgres.template.yml"
> - "templates/redis.template.yml"
> - "templates/web.template.yml"
> - "templates/web.ratelimited.template.yml"
> 
> expose:
> # host has a reverse proxy on these ports
> - "8080:80" # http
> - "8443:443" # https
> 
> params:
> db_default_text_search_config: "pg_catalog.english"
> db_shared_buffers: "3072MB"
> 
> env:
> LANG: en_US.UTF-8
> UNICORN_WORKERS: 8
> DISCOURSE_HOSTNAME: mydomain.com
> DISCOURSE_RELATIVE_URL_ROOT: /forum/discourse
> DISCOURSE_DEVELOPER_EMAILS: 'info@mydomain.com'
> DISCOURSE_SMTP_ADDRESS: mydomain.com
> DISCOURSE_SMTP_PORT: 25
> DISCOURSE_SMTP_USER_NAME: user
> DISCOURSE_SMTP_PASSWORD: pass
> 
> ## The Docker container is stateless; all data is stored in /shared
> volumes:
> - volume:
> host: /var/discourse/shared/standalone
> guest: /shared
> - volume:
> host: /var/discourse/shared/standalone/log/var-log
> guest: /var/log
> 
> hooks:
> after_code:
> - exec:
> cd: $home/plugins
> cmd:
> - git clone https://github.com/discourse/docker_manager.git
> 
> ## Any custom commands to run after building
> run:
> - exec: echo "Beginning of custom commands"
> ## https://meta.discourse.org/t/subfolder-support-with-docker/30507
> - exec:
> cd: $home
> cmd:
> - mkdir -p public/forum/discourse
> - cd public/forum/discourse && ln -s ../../uploads && ln -s ../../backups
> - replace:
> global: true
> filename: /etc/nginx/conf.d/discourse.conf
> from: proxy_pass http://discourse;
> to: |
> rewrite ^/(.*)$ /forum/discourse/$1 break;
> proxy_pass http://discourse;
> - replace:
> filename: /etc/nginx/conf.d/discourse.conf
> from: etag off;
> to: |
> etag off;
> location /forum/discourse {
> rewrite ^/forum/discourse/?(.*)$ /$1;
> }
> - replace:
> global: true
> filename: /etc/nginx/conf.d/discourse.conf
> from: $proxy_add_x_forwarded_for
> to: $http_your_original_ip_header
> - exec: echo "End of custom commands"
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491)._
