# Change the Domain-Name

**URL:** <https://discourse.libretime.org/t/change-the-domain-name/597>\
**Category:** Get Help\
**Created:** [June 13, 2020, 9:25am UTC](https://discourse.libretime.org/t/change-the-domain-name/597 "2020-06-13T09:25:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matth](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@Matth](https://discourse.libretime.org/u/Matth)\
**Post date:** [June 13, 2020, 9:25am UTC](https://discourse.libretime.org/t/change-the-domain-name/597/1 "2020-06-13T09:25:17Z")

</div>

Hi

I have installed a Libretime on a new server and it was initially up and running perfectly fine. I then thought I could simply change the domain name. From [https://libretime.xyz.com/](https://libretime.xyz.com/) I want to change to [https://music.abc.com/](https://music.abc.com/).

- I changed the server in the airtime.conf/airtime-le-ssl.conf in /etc/apache2/sites-available/
- I modified the airtime.conf in /etc/airtime
- I also modified liquidsoap.cfg in etc/airtime

I then rebooted the server and tried to login again. Now all I get is the “Oops something went wrong” screen.

I then also tried to delete airtime.conf and recreate the configuration. That also didn’t help.

I can still access and login using the old URL, but I obviously get an error message because of the wrong SSL cert. And when I login using the old URL, it says “Can not connect to the streaming server Problem with Liquidsoap…”. Though under Status everything looks green and with a check-mark.

I haven’t uploaded any data yet, so I could simply wipe it, but is there something I have missed changing? Can the domain name not be changed?

Maybe a bit more as an explanation. The [xyz.com](http://xyz.com) domain is my local domain at the network. I do access the libretime server via a reverse proxy that forwards the requests to the IP-addresses of the server using the normal http protocol. The SSL cert is on the reverse proxy.

---

<div class="post-metadata">

**Author:** ![Matth](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@Matth](https://discourse.libretime.org/u/Matth)\
**Post date:** [June 13, 2020, 3:57pm UTC](https://discourse.libretime.org/t/change-the-domain-name/597/2 "2020-06-13T15:57:18Z")

</div>

After I set up a new, clean server, I faced the same problem. So I realized, the problem was with the reverse proxy, and not with Libretime.

Tweaking my setup a bit more and “fixing” the reverse proxy, it now works again like a charm, even with both domain names at the same time.

---

<div class="post-metadata">

**Author:** ![expert-geeks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/expert-geeks/32/272_2.png) [@expert-geeks](https://discourse.libretime.org/u/expert-geeks)\
**Post date:** [June 15, 2020, 3:33pm UTC](https://discourse.libretime.org/t/change-the-domain-name/597/3 "2020-06-15T15:33:10Z")

</div>

Would you mind posting up your reverse proxy config ? That could prove useful.

Thanks!

---

<div class="post-metadata">

**Author:** ![Matth](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@Matth](https://discourse.libretime.org/u/Matth)\
**Post date:** [June 16, 2020, 6:30am UTC](https://discourse.libretime.org/t/change-the-domain-name/597/4 "2020-06-16T06:30:41Z")

</div>

This is the part below that handles the Libretime server. It is in the file /etc/nginx/sites-available/music.conf

On the Libretime server I link back to the same SSL cert files (or copy them with a cron job) so that Libretime also uses SSL.

```
server {
    if ($host = libretime.xyz.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    server_name libretime.xyz.com;

    location / {
        proxy_pass http://192.168.7.66;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 443 ssl;
    server_name libretime.xyz.com;

    location / {
        proxy_pass https://192.168.7.66;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    ssl_certificate /etc/letsencrypt/live/libretime.xyz.com/fullchain.pem; # man$
    ssl_certificate_key /etc/letsencrypt/live/libretime.xyz.com/privkey.pem; # m$
}
```
