# Migration issue, redirecting to localhost

**URL:** <https://forums.rocket.chat/t/migration-issue-redirecting-to-localhost/5538>\
**Category:** Community Support\
**Created:** [January 15, 2020, 2:00pm UTC](https://forums.rocket.chat/t/migration-issue-redirecting-to-localhost/5538 "2020-01-15T14:00:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvv\_vmd](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@mvv\_vmd](https://forums.rocket.chat/u/mvv_vmd)\
**Post date:** [January 15, 2020, 2:00pm UTC](https://forums.rocket.chat/t/migration-issue-redirecting-to-localhost/5538/1 "2020-01-15T14:00:57Z")

</div>

### Description

\<-Please note, the spaces in “links” are there because the forum software does not like them-\>

I have installed Rocket Chat using snap with a Apache proxy. This is working fine but when I import a dump from a different instance I need to migrate it starts to redirect to h t t p s : / / 127.0.0.1 /.

There are no issues with the import of the dump, also no errors in the logs of RC or Apache.

### Server Setup Information

- Version of Rocket.Chat Server: 1.2.3
- Operating System: Ubuntu 18.04
- Deployment Method: snap
- Number of Running Instances: 1
- NodeJS Version: 8.11.3
- MongoDB Version: 3.4.20
- Proxy: apache
- Firewalls involved: iptables

### Any additional Information

The Apache proxy config:

RewriteEngine On  
RewriteCond %{HTTP:Upgrade} =websocket [NC]  
RewriteRule /(._) w s : / / 127.0.0.1 :3000/$1 [P,L]  
RewriteCond %{HTTP:Upgrade} !=websocket [NC]  
RewriteRule /(._) h t t p : / / 127.0.0.1:3000/$1 [P,L]

ProxyPassReverse / h t t p : / / 127.0.0.1:3000/

I noticed in the initial install the Site URL was listed as h t t p : / / localhost, now this is the URL used externally ( h t t p s : / / [chat.example.org](http://chat.example.org)). I tried to change it but this does seem possible. I used “snap set rocketchat-server siteurl= h t t p : / / localhost” as documented.

I do not know the configuration of the previous host which is likely the issue.

Many thanks for any help on this in advance.

---

<div class="post-metadata">

**Author:** ![mvv\_vmd](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@mvv\_vmd](https://forums.rocket.chat/u/mvv_vmd)\
**Post date:** [January 15, 2020, 3:20pm UTC](https://forums.rocket.chat/t/migration-issue-redirecting-to-localhost/5538/2 "2020-01-15T15:20:00Z")

</div>

Found the issue, it was the Force\_SSL setting, managed to fix it directly in the database. The snap way of changing settings seems broken on my system, I tried setting it that way before.

In the command line I did the following.

~# mongo  
use parties  
db.rocketchat\_settings.update({ \_id: “Force\_SSL” }, { $set: { value: false } });

> <https://github.com/RocketChat/Rocket.Chat/issues/1968>
>
> Hi, I upgrade to 0.14.0 and enabled force ssl, my rocket chat is in redirect loop.
> I have configured my apache also...
