# Certbot ssl breaks widgets and album art

**URL:** <https://discourse.libretime.org/t/certbot-ssl-breaks-widgets-and-album-art/754>\
**Category:** Get Help\
**Created:** [January 1, 2021, 4:15am UTC](https://discourse.libretime.org/t/certbot-ssl-breaks-widgets-and-album-art/754 "2021-01-01T04:15:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshdavies00](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/joshdavies00/32/416_2.png) [@joshdavies00](https://discourse.libretime.org/u/joshdavies00)\
**Post date:** [January 1, 2021, 4:15am UTC](https://discourse.libretime.org/t/certbot-ssl-breaks-widgets-and-album-art/754/1 "2021-01-01T04:15:34Z")

</div>

Hi All,

I noticed a few issues after setting up SSL for my Libretime instance using certbot. The widgets on the login page try and pull the content from my localhost, and subsequently cannot load:

 ![libretime-error-1](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/165f0b98f18d015a132363161ea2975b3b8590c6.jpeg)

The same error also seems to apply to the album art preview, but this is less regular and will switch between correctly display the currently playing album art, and displaying a broken link. I am able to resolve both of these issues by changing the base url in airtime.conf to the domain name rather than the default local ip, however this then causes the Libretime instance to be unable to connect to Icecast, killing my stream. I have attached my Apache host configs as I figured this was the most likely cause. I don’t have a ton of experience so am likely just making an obvious mistake here but wondered if anybody had any pointers on what config mistakes could be causing this behavior.

airtime.conf:

```
<VirtualHost *:80>
   ServerAdmin tech@purpleradio.co.uk
   DocumentRoot /usr/share/airtime/php/airtime_mvc/public/
   php_admin_value upload_tmp_dir /tmp
   php_value post_max_size 500M
   php_value upload_max_filesize 500M
   php_value request_order "GPC"
   php_value session.gc_probability 0
   php_value session.auto_start 0

   AddOutputFilterByType DEFLATE text/plain
   AddOutputFilterByType DEFLATE text/html
   AddOutputFilterByType DEFLATE text/xml
   AddOutputFilterByType DEFLATE text/css
   AddOutputFilterByType DEFLATE application/xml
   AddOutputFilterByType DEFLATE application/xhtml+xml
   AddOutputFilterByType DEFLATE application/rss+xml
   AddOutputFilterByType DEFLATE application/javascript
   AddOutputFilterByType DEFLATE application/x-javascript
   AddOutputFilterByType DEFLATE application/json

   SSLProxyEngine on
   ProxyPreserveHost On
   ProxyRequests Off
   ProxyPass "/stream" "http://localhost:8000/stream"
   ProxyPassReverse "/stream" "http://localhost:8000/stream"

  <Directory /usr/share/airtime/php/airtime_mvc/public/>
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} -s [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d
      RewriteRule ^.*$ - [NC,L]
      RewriteRule ^.*$ index.php [NC,L]

      DirectoryIndex index.php
      AllowOverride all
      Order allow,deny
      Allow from all

      Require all granted
  </Directory>
RewriteCond %{SERVER_NAME} =radio.purpleradio.co.uk
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

```

airtime-le-ssl.conf

```
<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerAdmin tech@purpleradio.co.uk
  DocumentRoot /usr/share/airtime/php/airtime_mvc/public/
  php_admin_value upload_tmp_dir /tmp
  php_value post_max_size 500M
  php_value upload_max_filesize 500M
  php_value request_order "GPC"
  php_value session.gc_probability 0
  php_value session.auto_start 0

  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/json

  SSLProxyEngine on
  ProxyPreserveHost On
  ProxyRequests Off
  ProxyPass /stream http://localhost:8000/stream
  ProxyPassReverse /stream http://localhost:8000/stream
  
  <Directory /usr/share/airtime/php/airtime_mvc/public/>
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} -s [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d
      RewriteRule ^.*$ - [NC,L]
      RewriteRule ^.*$ index.php [NC,L]

      DirectoryIndex index.php
      AllowOverride all
      Order allow,deny
      Allow from all

      Require all granted
  </Directory>

ServerName radio.purpleradio.co.uk
SSLCertificateFile /etc/letsencrypt/live/radio.purpleradio.co.uk/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/radio.purpleradio.co.uk/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
```

---

<div class="post-metadata">

**Author:** ![hairmare](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/hairmare/32/38_2.png) [@hairmare](https://discourse.libretime.org/u/hairmare)\
**Post date:** [January 2, 2021, 10:07am UTC](https://discourse.libretime.org/t/certbot-ssl-breaks-widgets-and-album-art/754/2 "2021-01-02T10:07:45Z")

</div>

It looks like you need to set `base_url` and `base_port` in `/etc/airtime/airtime.conf` to reflect your real URL.

```auto
[general]
base_url = radio.purpleradio.co.uk
base_port = 443

```

The links to the widgets get generated based off of those values.
