# 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:** 1\
**Showing post:** 4

<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$
}
```

---

_[View the full topic](https://discourse.libretime.org/t/change-the-domain-name/597)._
