NGINX + Subsonic + Custom port
July 25, 2014 08:16AM
I posted on the subsonic forum, but because I'm using nginx, maybe you guys can help.

you can find my post on subsonic here:
http://forum.subsonic.org/forum/viewtopic.php?f=2&t=14579&sid=068b793be70ade3f015d70feba253108&p=63831#p63831

my problem is, when using nginx (SSL:8443) to proxy subsonic (SSL:4141) I get a 502 bad gateway, and this error in the log:

2014/07/24 21:14:02 [error] 22465#0: *3 SSL_do_handshake() failed (SSL: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error) while SSL handshaking to upstream, client: 10.66.26.1, server: subsonic.domain.org, request: "GET /favicon.ico HTTP/1.1", upstream: "https://127.0.0.1:4141/favicon.ico", host: "subsonic.domain.org:8443"

any idea?
Re: NGINX + Subsonic + Custom port
July 25, 2014 09:53AM
https://www.ruby-forum.com/topic/4418486

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: NGINX + Subsonic + Custom port
July 25, 2014 10:31AM
Oh my god! thanks to you!!

First upgraded my nginx to the latest (I was running 1.2.1)

There is my subsonic config:
root@coruscant:/etc/nginx/sites-enabled# cat /etc/default/subsonic
#
# This is the configuration file for the Subsonic service
# (/etc/init.d/subsonic)
#
# To change the startup parameters of Subsonic, modify
# the SUBSONIC_ARGS variable below.
#
# Type "subsonic --help" on the command line to read an
# explanation of the different options.
#
# For example, to specify that Subsonic should use port 80 (for http)
# and 443 (for https), and use a Java memory heap size of 200 MB, use
# the following:
#
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"

SUBSONIC_ARGS="--port=0 --https-port=4141 --max-memory=150"


# The user which should run the Subsonic process. Default "root".
# Note that non-root users are by default not allowed to use ports
# below 1024. Also make sure to grant the user write permissions in
# the music directories, otherwise changing album art and tags will fail.

SUBSONIC_USER=www-data


and there is my nginx config:
server {
### server port and name ###
listen 10.66.26.192:8443 ssl;
server_name subsonic.domain.org;

### SSL log files ###
access_log /var/log/nginx/subsonic-access.log;
error_log /var/log/nginx/subsonic-error.log;

### SSL cert files ###
ssl_certificate /etc/nginx/ssl/domain.org.crt;
ssl_certificate_key /etc/nginx/ssl/domain.org.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;

### We want full access to SSL via backend ###
location / {
proxy_ssl_protocols SSLv3;
proxy_pass https://127.0.0.1:4141;

### Set headers ####
proxy_set_header Host $host:8443;
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_redirect off;

client_max_body_size 16G;

proxy_read_timeout 1800;
proxy_send_timeout 1800;
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready