Proxy Nginx does not show page

Need help? Post your questions here.
Dorian Hawkmoon
Posts: 1
Joined: 16 Oct 2015, 12:57
Has thanked: 0
Been thanked: 0

Proxy Nginx does not show page

Unread post by Dorian Hawkmoon » 16 Oct 2015, 14:04

Hi people.

I installed madsonic with success. The configuration is as follow on /etc/default/madsonic:

Code: Select all

MADSONIC_ARGS="--port=4141 --init-memory=256 --max-memory=512"
MADSONIC_USER=madsonic
Everything working fine from localhost:4141 or from another computer in lan with ipserver:4141

I use nginx (because I have more services in server and I don't want apache) as a proxy, the configuration is:

Code: Select all

server {
	listen 80;
	server_name subsonic.ookami.org;
	rewrite ^ https://$server_name$request_uri? permanent;
	add_header Strict-Transport-Security "max-age=3153600; includeSubdomains";
}

server {
	listen 443 ssl;

	ssl_certificate /etc/nginx/ssl/subsonic.ookami.org.crt;
	ssl_certificate_key /etc/nginx/ssl/subsonic.ookami.org.key;

	include /etc/nginx/conf.d/ciphers.conf;
	
	access_log /var/log/madsonic.acccess.log;
	error_log /var/log/madsonic.error.log;

	server_name subsonic.ookami.org;

	location / {
		proxy_pass http://127.0.0.1:4141;
		proxy_redirect off;
    		proxy_set_header Host $host;
    		proxy_set_header  X-Forwarded-Server $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-Host $server_name;
	}

}
Don't worry about name server, that's because of the certificate which I didn't change yet.
The problem is, I can access to the login page throught the https url. Once I login in correctly, the page just disappears, whole blank. But still can access and login from the plain ip:port, all seems ok, so the problem is in nginx side. No error on log, and both pages (throught https and ip:port) have exactly the same source code.

I opened the port in my router just in case, ¿I forget something in the configuration?

I tried every configuration I see, two or three, all are the same as mine. Even tried just redirecting plain http to https port of madsonic, but i can get it working.

Post Reply