# Apps can't connect to subfolder RC instance

**URL:** <https://forums.rocket.chat/t/apps-cant-connect-to-subfolder-rc-instance/580>\
**Category:** Community Support\
**Created:** [April 16, 2018, 8:10am UTC](https://forums.rocket.chat/t/apps-cant-connect-to-subfolder-rc-instance/580 "2018-04-16T08:10:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![panki](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@panki](https://forums.rocket.chat/u/panki)\
**Post date:** [April 16, 2018, 8:10am UTC](https://forums.rocket.chat/t/apps-cant-connect-to-subfolder-rc-instance/580/1 "2018-04-16T08:10:18Z")

</div>

Hello Rocket.Chat Forum!  
I’ve been trying to set up my own instance on my VPS.  
Because there’s already a website running on Apache with a valid Let’s Encrypt certificate, I opted to use the subdirectory installation.

Installation was performed manually, oplog not configured, ROOT\_URL set to [https://domain.com/chat/](https://domain.com/chat/), proxy is configured.

It works via webbrowser aswell as the windows desktop client (need to enter an extra slash at the end), but not in the (various) Android apps.  
The native app just flashes an error message upon trying to login:  
“chat.rocket.android\_ddp.DDPClientCallback$Closed”

I have used Google and tried my best to fix this myself, but to no avail.  
Here is my apache2 site conf:  
`<IfModule mod_ssl.c>`  
`<VirtualHost *:443>`  
`ServerName www.domain.com`  
`ServerAlias domain.com *.domain.com`  
`ServerAdmin mail@domain.com`  
`UseCanonicalName On`  
`DocumentRoot /var/www/domain`

```
    <a few Directory tags>

    `<Location /chat>`
        Order allow,deny
        Allow from all

        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /var/www/domain/(.*) ws://localhost:3000/$1 [P,L]
        RewriteCond %{HTTP:Upgrade} !=websocket [NC]
        RewriteRule /var/www/domain/(.*) http://localhost:3000/$1 [P,L]
        ProxyPassReverse http://localhost:3000
    </Location>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/domain.com/chain.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

```

Thanks in advance for any help provided!  
~Panki

---

<div class="post-metadata">

**Author:** ![aaron.ogle](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aaron.ogle/32/15_2.png) [@aaron.ogle](https://forums.rocket.chat/u/aaron.ogle)\
**Post date:** [May 31, 2018, 8:18pm UTC](https://forums.rocket.chat/t/apps-cant-connect-to-subfolder-rc-instance/580/2 "2018-05-31T20:18:31Z")

</div>

Have you tried this in more recent versions of the app? If i’m not mistaken it should work.
