# Upgrade doesn't work when installed with subfolder

**URL:** <https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668>\
**Category:** Bug\
**Created:** [23. September 2015 um 21:47 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668 "2015-09-23T21:47:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![wglass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wglass/32/116728_2.png) [@wglass](https://meta.discourse.org/u/wglass)\
**Post date:** [24. September 2015 um 00:17 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/3 "2015-09-24T00:17:42Z")

</div>

One thing to note – I have two subfolders not one. If it’s helpful, here’s the run section of my app.yml.

```
run:
  - exec: echo "Beginning of custom commands"

  - exec:
        cd: $home
        cmd:
          - mkdir -p public/ep/support
          - cd public/ep/support && ln -s ../../uploads && ln -s ../../backups
          - rm public/uploads
          - rm public/backups
  - replace:
       global: true
       filename: /etc/nginx/conf.d/discourse.conf
       from: proxy_pass http://discourse;
       to: |
          rewrite ^/(.*)$ /ep/support/$1 break;
          proxy_pass http://discourse;
  - replace:
       filename: /etc/nginx/conf.d/discourse.conf
       from: etag off;
       to: |
          etag off;
          location /ep/support {
             rewrite ^/ep/support/?(.*)$ /$1;
          }
  - replace:
         filename: /etc/nginx/conf.d/discourse.conf
         from: $proxy_add_x_forwarded_for
         to: $http_fastly_client_ip
         global: true

```

---

_[View the full topic](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668)._
