# 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:** [2015年九月23日 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:** 7
**Page:** 1

<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: [2015年九月23日 21:47 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/1 "2015-09-23T21:47:41Z")

</div>

I’ve installed my copy of Discourse in a subfolder, per instructions here:

> [@Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507):
>
> warning Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not use this setup unless you are very experienced in custom subfolder setups. It is critical you have a deep understanding of NGINX setup in the Discourse Docker container Secure original IP forwarding using custom headers in the proxy chain Rate limiting in front proxy server I…

I went to upgrade today to version 1.4. When I click “admin” / “upgrade”, I go to the wrong URL. When I manually go to /subfolder/admin/upgrade I see the menu but no list of upgrades. Looking under the hood there are two 404’s

GET /session/csrf  
GET /admin/docker/repos

Suggestions?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年九月23日 23:57 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/2 "2015-09-23T23:57:42Z")

</div>

My question is: how has nobody noticed this before?

---

<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: [2015年九月24日 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

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年九月24日 01:43 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/4 "2015-09-24T01:43:13Z")

</div>

It is possible we did not notice because our hosted customers don’t use this page.

We should look into this @neil in the meantime, use the SSH method to update your site. SSH in and do the three commands:

```
cd /var/discourse
git pull
./launcher rebuild app

```

---

<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: [2015年九月24日 05:36 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/5 "2015-09-24T05:36:48Z")

</div>

Thanks. The SSH method worked.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2017年六月6日 18:26 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/6 "2017-06-06T18:26:43Z")

</div>

This bug was fixed.

[https://github.com/discourse/docker\_manager/commit/58ed07e241cf3049de89522365927ee646ada25f](https://github.com/discourse/docker_manager/commit/58ed07e241cf3049de89522365927ee646ada25f)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2017年六月6日 18:26 UTC](https://meta.discourse.org/t/upgrade-doesnt-work-when-installed-with-subfolder/33668/7 "2017-06-06T18:26:48Z")

</div>


