Page 1 of 1
Thumbnails and images failing to load (error 500 it seems)
Posted: 02 Jun 2017, 23:13
by popomr
Hey guys,
I finally managed to make Madsonic work behind nxing in my domain.
However, even though sound works fine, images and thumbnails are not working.
In the bottom frame, I get that broken pic icon. In the library, I get the empty shell of the thumb + the html description of the image.
However, in the right sidebar, the images load fine. "Scans" folders show the images if I click on them (no thumb before, though).
In developer view in Chrome, I see lots of this error: "Failed to load resource: the server responded with a status of 500 ()" and "Uncaught ReferenceError: jQSB is not defined".
How can I solve this?
Thanks.
Re: Thumbnails and images failing to load (error 500 it seem
Posted: 03 Jun 2017, 01:09
by Madsonic
please check this nginx config with your setup:
http://forum.madsonic.org/viewtopic.php ... 827&p=6684
best regards
Re: Thumbnails and images failing to load (error 500 it seem
Posted: 03 Jun 2017, 02:15
by popomr
I read the thread but couldn't find a workaround.
Actually some of the measures described were necessary for me to get past the login page.
So my NGINX looks like this now:
Code: Select all
server {
listen 80;
listen [::]:80;
server_name exampledomain.xyz;
return 302 https://$server_name$request_uri;
}
server {
listen 80;
listen [::]:80;
server_name server-ip;
location / {
deny all;
}
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
include snippets/ssl-nginx.conf;
include snippets/ssl-params.conf;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name serverdomain.xyz;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
location /music {
proxy_pass http://127.0.0.1:4040;
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_redirect http:// https://;
add_header X-Frame-Options SAMEORIGIN;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name server.ip;
location / {
deny all;
}
}
Madsonic config has these changes:
Code: Select all
MADSONIC_ARGS="context-path=/music --port=4040 --init-memory=128 --max-memory=192"
Icons for the menu items are ok also.
Some spaces on the code are due to spam filter on the forum.
Re: Thumbnails and images failing to load (error 500 it seem
Posted: 03 Jun 2017, 10:16
by Madsonic
Hi there,
i setup a new test environment as follow:
*) install os (debian9)
*) install oracle java (JRE8)
*) install Madsonic server (6.3.9500)
*) install nginx (1.10.3)
*) create selfsign cert
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
*) edit nginx config
Code: Select all
sudo nano /etc/nginx/sites-enabled/default
*) replace nginx config
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;
}
}
*) edit Madsonic settings:
Code: Select all
MADSONIC_ARGS="--context-path=/music --port=4040 --init-memory=256 --max-memory=512"
*) restart services
Code: Select all
sudo service madsonic restart
sudo service nginx restart
*) try to access Madsonic local
*) try to access Madsonic over nginx
That's it!
Hope this help you to check your config!
Best regards