# אין קידום תיקיות משנה לחלק מהמשאבים

**URL:** https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491
**Category:** Self-hosting
**Created:** [26 בספטמבר,‏ 2020,‏ 11:43pm UTC](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491 "2020-09-26T23:43:36Z")
**Posts on this page:** 3
**Page:** 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 בספטמבר,‏ 2020,‏ 11:43pm 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"
> 
> ```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [26 בספטמבר,‏ 2020,‏ 11:55pm UTC](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491/2 "2020-09-26T23:55:56Z")

</div>

The placeholders resources don’t load the subfolder path indeed, but as soon as you finish the wizard setup the new logs added with it will have the subfolder prefix.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [27 באוקטובר,‏ 2020,‏ 12:08am UTC](https://meta.discourse.org/t/no-subfolder-prefixing-for-some-resources/165491/3 "2020-10-27T00:08:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
