Binhex-airsonic with letsencrypt


Recommended Posts

Hi,  I am trying to get airsonic to be visible on my external domain. I followed spaceinvaderone's video on setting up reverse proxy for nextcloud however I can not figure  out how to implement this for air sonic. I have next cloud up and running however dont know what needs to be put in the conf file for airsonic

 

any help is much appreciated

 

thanks

Link to comment
  • 6 months later...

James,

 

I struggled with this for quite a while as well with my duckdns subdomain & letsencrypt configuration.  Here is the config I pieced together from several places that finally worked.  I placed it here:

 

\Appdata\letsencrypt\nginx\proxy-confs
airsonic.subdomain.conf


Replace XXXXXX with your own domain name

Replace proxy_pass ip with the IP of your server (mine was 192.168.0.30)

 

 

----------------
# Redirect HTTP to HTTPS
server {
    listen      80;
    server_name XXXXXXX.duckdns.org;
    return      301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name XXXXXXXXX.duckdns.org;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


 # Proxy to the Airsonic server
    location / {
        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 https;
        proxy_set_header X-Forwarded-Host  $http_host;
        proxy_set_header Host              $http_host;
        proxy_max_temp_file_size           0;
        proxy_pass                         http://192.168.0.30:4040;
        proxy_redirect                     http:// https://;
    }
}

Link to comment
  • 1 year later...
On 3/22/2019 at 7:55 PM, pancho said:

James,

 

I struggled with this for quite a while as well with my duckdns subdomain & letsencrypt configuration.  Here is the config I pieced together from several places that finally worked.  I placed it here:

 

\Appdata\letsencrypt\nginx\proxy-confs
airsonic.subdomain.conf


Replace XXXXXX with your own domain name

Replace proxy_pass ip with the IP of your server (mine was 192.168.0.30)

 

 

----------------
# Redirect HTTP to HTTPS
server {
    listen      80;
    server_name XXXXXXX.duckdns.org;
    return      301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name XXXXXXXXX.duckdns.org;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


 # Proxy to the Airsonic server
    location / {
        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 https;
        proxy_set_header X-Forwarded-Host  $http_host;
        proxy_set_header Host              $http_host;
        proxy_max_temp_file_size           0;
        proxy_pass                         http://192.168.0.30:4040;
        proxy_redirect                     http:// https://;
    }
}

Hi guys - sorry to revive a very old post, but this is the first post I've found that seems to relate directly to my specific circumstances.

 

In the config you mention above, you have the relevant port 80 and 443. In my Airsonic setup I have a different TCP (and UDP) port setup - does this change any of this, or will the first port of call (see what I did there?) still bee 443 for SSL? For example, my Airsonic might be on port 4444 (TCP).

 

I've added the Airsonic docker onto the relevant network I created for Lets Encrypt (and Nextcloud) to run across, and added in to the Let's Encrypt docker the subdomain entry I wanted to use (for example 'music'). I do all of this and update the config as above, but SSL still fails.

 

What am I missing here, aside from a fundamental network understanding! :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.