*) install System (debian9)
*) install Oracle Java (JDK8)
*) install Madsonic Server (6.3.9500)
*) install nginx (1.10.3)
*) create selfsign cert /etc/nginx/cert.crt
Code: Select all
cd /etc/nginx
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt
Code: Select all
sudo nano /etc/nginx/sites-enabled/default
Code: Select all
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name localhost; # Replace localhost with your.domain.com
ssl_certificate /etc/nginx/cert.crt;
ssl_certificate_key /etc/nginx/cert.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/madsonic.access.log;
error_log /var/log/nginx/madsonic.error.log;
location /music {
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;
proxy_pass http://localhost:4040;
proxy_redirect http:// https://;
proxy_read_timeout 90;
add_header X-Frame-Options SAMEORIGIN;
}
}
Code: Select all
sudo nano /etc/default/madsonic
Code: Select all
MADSONIC_ARGS="--context-path=/music --port=4040 --init-memory=256 --max-memory=512"
Code: Select all
sudo service madsonic restart
sudo service nginx restart
Code: Select all
http://localhost:4040
Code: Select all
http://localhost/music
Hope this help you to check your config!
Best regards
The Madsonic Team